diff --git a/.github/actions/composite-perf/action.yml b/.github/actions/composite-perf/action.yml index 23607557cb..7be1f731cb 100644 --- a/.github/actions/composite-perf/action.yml +++ b/.github/actions/composite-perf/action.yml @@ -38,8 +38,6 @@ 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 @@ -47,11 +45,18 @@ runs: 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 @@ -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 @@ -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 \ No newline at end of file + echo "heaptrack_scap=$(realpath heaptrack_scap.data.zst)" >> $GITHUB_OUTPUT