EX-10318: add metrics for osc.*.state.current_state #390
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, reopened, edited, synchronize] | |
| jobs: | |
| benchmark_lustre_metrics: | |
| name: Benchmark Lustre Metrics | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: bencherdev/bencher@main | |
| - name: Install Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install Valgrind | |
| run: sudo apt-get update && sudo apt-get install -y valgrind | |
| # Callgrind runner version must match iai-callgrind version specified in Cargo.toml | |
| - name: Install iai-callgrind-runner | |
| run: | | |
| version=$(cargo metadata --format-version=1 |\ | |
| jq '.packages[] | select(.name == "iai-callgrind").version' |\ | |
| tr -d '"' | |
| ) | |
| cargo install iai-callgrind-runner --version $version --force | |
| - name: Track Lustre Metrics Benchmarks on main branch | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| run: | | |
| bencher run \ | |
| --project '${{ secrets.BENCHER_PROJECT_ID }}' \ | |
| --token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
| --branch main \ | |
| --testbed ci-runner \ | |
| --threshold-measure Instructions \ | |
| --threshold-test t_test \ | |
| --threshold-max-sample-size 64 \ | |
| --threshold-lower-boundary 0.95 \ | |
| --threshold-upper-boundary 0.95 \ | |
| --err \ | |
| --adapter rust_iai_callgrind \ | |
| --github-actions '${{ secrets.GITHUB_TOKEN }}' \ | |
| "cargo bench --bench lustre_metrics" | |
| - name: Compare Lustre Metrics Benchmarks with main branch | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| bencher run \ | |
| --project '${{ secrets.BENCHER_PROJECT_ID }}' \ | |
| --token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
| --branch '${{ github.head_ref }}' \ | |
| --start-point main \ | |
| --testbed ci-runner \ | |
| --start-point-clone-thresholds \ | |
| --err \ | |
| --adapter rust_iai_callgrind \ | |
| --github-actions '${{ secrets.GITHUB_TOKEN }}' \ | |
| "cargo bench --bench lustre_metrics" |