Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add an empty run for scap file before perf'ing it. #1977

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading