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

fix(ci): only account for mean values in google benchmarks perf CI checks #2030

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
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
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup: no need to test the build of benchmarks in normal CI now that they run in perf CI.

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1
run: |
mkdir -p build
cd build && cmake ${{ matrix.cmake_opts }} -DENABLE_BENCHMARKS=ON ../
cd build && cmake ${{ matrix.cmake_opts }} ../
KERNELDIR=/lib/modules/$(ls /lib/modules)/build make -j4
make run-unit-tests

Expand All @@ -90,15 +90,9 @@ jobs:
- name: Build and test 🏗️🧪
run: |
mkdir -p build
cd build && cmake -DBUILD_BPF=On -DBUILD_DRIVER=Off -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DUSE_SHARED_LIBELF=Off -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On -DENABLE_BENCHMARKS=ON ../
cd build && cmake -DBUILD_BPF=On -DBUILD_DRIVER=Off -DUSE_BUNDLED_DEPS=On -DUSE_BUNDLED_LIBELF=Off -DUSE_SHARED_LIBELF=Off -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On ../
make run-unit-tests -j4

- name: Run benchmarks
run: |
cd build
make bench
./benchmark/bench

build-shared-libs-linux-amd64:
name: build-shared-libs-linux-amd64 🧐
runs-on: ubuntu-latest
Expand All @@ -121,7 +115,7 @@ jobs:
- name: Build and test 🏗️🧪
run: |
mkdir -p build
cd build && cmake -DBUILD_SHARED_LIBS=True -DUSE_BUNDLED_DEPS=False -DMINIMAL_BUILD=True -DCMAKE_INSTALL_PREFIX=/tmp/libs-test -DENABLE_BENCHMARKS=ON ../
cd build && cmake -DBUILD_SHARED_LIBS=True -DUSE_BUNDLED_DEPS=False -DMINIMAL_BUILD=True -DCMAKE_INSTALL_PREFIX=/tmp/libs-test ../
make -j4
make run-unit-tests

Expand Down Expand Up @@ -161,7 +155,7 @@ jobs:
- name: Build and test 🏗️🧪
run: |
mkdir -p build
cd build && cmake -DUSE_BUNDLED_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.crt }} -DCREATE_TEST_TARGETS=ON -DMINIMAL_BUILD=ON -DENABLE_BENCHMARKS=ON ..
cd build && cmake -DUSE_BUNDLED_DEPS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.crt }} -DCREATE_TEST_TARGETS=ON -DMINIMAL_BUILD=ON ..
cmake --build . --config Release --parallel 4 && make run-unit-tests || libsinsp\test\Release\unit-test-libsinsp.exe

build-shared-libs-macos-amd64:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ jobs:
run: |
# Remove first 3 lines and last line that are no tests results
tail -n+4 gbench_diff.txt | head -n -1 | while read p; do
diff_pct=$(echo "$p" | awk '{print $3}' | tr -d '+')
if (( $(echo "$diff_pct >= 5.0" | bc -l) )); then
exit 1
test_name=$(echo "$p" | awk '{print $1}')
if [[ "$test_name" =~ _mean$ ]]; then
diff_pct=$(echo "$p" | awk '{print $3}' | tr -d '+')
if (( $(echo "$diff_pct >= 5.0" | bc -l) )); then
exit 1
fi
fi
done
Loading