Skip to content

Commit

Permalink
chore(ci): add an empty run for scap file before perf'ing it.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Jul 29, 2024
1 parent 64fe187 commit e26d671
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/actions/composite-perf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,25 @@ runs:
cd build
wget https://download.falco.org/fixtures/trace-files/traces-positive.zip
unzip traces-positive.zip
mkdir -p /dev/shm/libs-${{ github.run_id }}
mv traces-positive/falco-event-generator.scap /dev/shm/libs-${{ github.run_id }}/falco-event-generator.scap
- name: Run - perf unit tests
shell: bash
run: |
cd build
sudo perf record --call-graph dwarf -o perf_tests.data -q libsinsp/test/unit-test-libsinsp
# First empty run to stabilize disk IO (scap file read) perf
- name: Run - load scap file
shell: bash
run: |
cd build
sudo ./libsinsp/examples/sinsp-example -s traces-positive/falco-event-generator.scap &> /dev/null
- name: Run - perf scap file
shell: bash
run: |
cd build
sudo nice ionice -c 1 -n 0 perf record --call-graph dwarf -o perf_scap.data -q ./libsinsp/examples/sinsp-example -s /dev/shm/libs-${{ github.run_id }}/falco-event-generator.scap
sudo perf record --call-graph dwarf -o perf_scap.data -q ./libsinsp/examples/sinsp-example -s traces-positive/falco-event-generator.scap
- name: Run - heaptrack unit tests
shell: bash
Expand All @@ -63,11 +68,7 @@ runs:
shell: bash
run: |
cd build
sudo nice ionice -c 1 -n 0 heaptrack -o heaptrack_scap.data ./libsinsp/examples/sinsp-example -s /dev/shm/libs-${{ github.run_id }}/falco-event-generator.scap
- name: Cleanup tmpfs
shell: bash
run: rm -rf /dev/shm/libs-${{ github.run_id }}/
sudo heaptrack -o heaptrack_scap.data ./libsinsp/examples/sinsp-example -s traces-positive/falco-event-generator.scap
- name: Set Outputs
id: store-outputs
Expand All @@ -77,4 +78,4 @@ runs:
echo "perf_tests=$(realpath perf_tests.data)" >> $GITHUB_OUTPUT
echo "perf_scap=$(realpath perf_scap.data)" >> $GITHUB_OUTPUT
echo "heaptrack_tests=$(realpath heaptrack_tests.data.zst)" >> $GITHUB_OUTPUT
echo "heaptrack_scap=$(realpath heaptrack_scap.data.zst)" >> $GITHUB_OUTPUT
echo "heaptrack_scap=$(realpath heaptrack_scap.data.zst)" >> $GITHUB_OUTPUT

0 comments on commit e26d671

Please sign in to comment.