Skip to content

[WIP] Benchmark

[WIP] Benchmark #12

Workflow file for this run

name: Benchmark
on:
push:
branches:
- main
pull_request:
branches:
- main
# permissions:
# contents: write
# deployments: write
jobs:
benchmark:
name: Run Benchmark.Net benchmark example
runs-on: ubuntu-latest
steps:
- name: Checkout libstapsdt repo
uses: actions/checkout@v4
with:
repository: linux-usdt/libstapsdt
ref: refs/heads/main
path: ext_libstapsdt
- name: Install libstapsdt
run: |
set -euxo pipefail
sudo apt install libelf-dev
cd ext_libstapsdt
make
sudo make install
sudo ldconfig
shell: bash
- name: Checkout DynamicProbes repo
uses: actions/checkout@v4
- name: Install dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.401'
- name: Run benchmark
run: cd benchmark && dotnet run --exporters json --filter '*' -c Release
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Benchmark.Net Benchmark
tool: 'benchmarkdotnet'
output-file-path: benchmark/BenchmarkDotNet.Artifacts/results/NotObservedProbeFireBenchmarks.Benchmarks-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@gukoff'
# - name: Store benchmark result - separate results repo
# uses: rhysd/github-action-benchmark@v1
# with:
# name: Benchmark.Net Benchmark
# tool: 'benchmarkdotnet'
# output-file-path: DynamicProbes/benchmark/BenchmarkDotNet.Artifacts/results/Sample.Benchmarks-report-full-compressed.json
# github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
# auto-push: true
# # Show alert with commit comment on detecting possible performance regression
# alert-threshold: '200%'
# comment-on-alert: true
# fail-on-alert: true
# alert-comment-cc-users: '@ktrz'
# gh-repository: 'github.com/benchmark-action/github-action-benchmark-results'