Skip to content

Commit

Permalink
ci(perf-test): add flamegraph action
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <[email protected]>
  • Loading branch information
dwisiswant0 committed Jan 15, 2025
1 parent 68b5192 commit 080abd5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/perf-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@ jobs:
if: github.repository == 'projectdiscovery/nuclei'
env:
LIST_FILE: "/tmp/targets-${{ matrix.count }}.txt"
PROFILE_MEM: "nuclei-perf-test-${{ matrix.count }}"
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1
- run: make verify
- name: Generate list
run: for i in {1..${{ matrix.count }}}; do echo "https://scanme.sh/?_=${i}" >> "${LIST_FILE}"; done
- run: go run ${{ matrix.flags }} . -l "${LIST_FILE}"
- run: go run ${{ matrix.flags }} . -l "${LIST_FILE}" -profile-mem="${PROFILE_MEM}"
working-directory: cmd/nuclei/

- uses: projectdiscovery/actions/flamegraph@v1
id: flamegraph
with:
profile: "${{ env.PROFILE_MEM }}.prof"
continue-on-error: true
- if: ${{ steps.flamegraph.outputs.message == '' }}
run: echo "::notice::${FLAMEGRAPH_URL}"
env:
FLAMEGRAPH_URL: ${{ steps.flamegraph.outputs.url }}

0 comments on commit 080abd5

Please sign in to comment.