Skip to content

feat(zero): namespace custom mutators to the table they impact #170

feat(zero): namespace custom mutators to the table they impact

feat(zero): namespace custom mutators to the table they impact #170

name: Bencher
on:
push:
branches: main
jobs:
file_sizes:
name: File Sizes
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- uses: bencherdev/bencher@main
- run: npm ci
- run: npm run build
- name: Build npm zero package
working-directory: packages/zero
run: |
npm pack --pack-destination ./out
mv ./out/*.tgz ./out/zero-package.tgz
- name: Build zero client single file package
working-directory: packages/zero
run: npx tsx tool/build.ts --bundle-sizes --minify
- name: Compress
working-directory: packages/zero
run: brotli out/zero.js
- name: Upload benchmarks results to bencher.dev
working-directory: packages/zero
run: |
bencher run \
--project zero \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--adapter json \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--start-point main \
--threshold-measure file-size \
--threshold-test percentage \
--threshold-upper-boundary 0.02 \
--threshold-max-sample-size 2 \
--err \
--file-size out/zero-package.tgz \
--file-size out/zero.js.br \
--file-size out/zero.js
perf:
name: Perf
permissions:
checks: write
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- uses: bencherdev/bencher@main
- run: npm ci
- name: Install Playwright Deps
run: npx playwright install --with-deps
- name: Run benchmarks
working-directory: packages/zero-client
run: npm run bench -- --outputJson output.json
- name: Upload benchmarks results to bencher.dev
working-directory: packages/zero-client
run: |
cat output.json |\
npx tsx ../shared/src/tool/vitest-perf-json-to-bmf.ts |\
bencher run \
--project zero \
--token '${{ secrets.BENCHER_API_TOKEN }}' \
--adapter json \
--github-actions '${{ secrets.GITHUB_TOKEN }}' \
--start-point main \
--threshold-measure throughput \
--threshold-test t_test \
--threshold-lower-boundary 0.95 \
--err