Benchmark #419
This file contains 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
name: Benchmark | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
benchmark: | |
if: github.repository == 'poolifier/benchmark' | |
runs-on: | |
group: default | |
labels: [self-hosted, benchmark] | |
env: | |
BENCHER_PROJECT: poolifier-benchmark | |
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
BENCHER_ADAPTER: shell_hyperfine | |
BENCHER_TESTBED: self-hosted | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
check-latest: true | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --ignore-scripts --frozen-lockfile | |
- uses: bencherdev/bencher@main | |
- name: Run benchmark | |
run: | | |
bencher run \ | |
--branch main \ | |
--threshold-measure latency \ | |
--threshold-test t_test \ | |
--threshold-max-sample-size 64 \ | |
--threshold-upper-boundary 0.99 \ | |
--thresholds-reset \ | |
--file BENCH.json \ | |
--err \ | |
--github-actions ${{ secrets.GITHUB_TOKEN }} \ | |
"./bench.sh" |