-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add home-cooked “continuous benchmarking”
- Loading branch information
1 parent
d6ab3af
commit b81a328
Showing
17 changed files
with
2,463 additions
and
298 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Benchmark Main Branch | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'src/**/*.ts' | ||
|
||
jobs: | ||
benchmark: | ||
name: Run Benchmarks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.x' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install -C scripts/benchmarks | ||
pnpm install -C scripts/radashi-db | ||
- uses: awalsh128/[email protected] | ||
with: | ||
packages: valgrind | ||
version: 1 # The “cache version” for cache-busting | ||
|
||
- name: Run benchmarks | ||
env: | ||
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | ||
run: | | ||
# https://pythonspeed.com/articles/consistent-benchmarking-in-ci/ | ||
valgrind --tool=cachegrind ./scripts/benchmarks/node_modules/.bin/tsx ./scripts/benchmarks/ci-bench-main.ts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Benchmark Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: [main, next] | ||
paths: | ||
- 'src/**/*.ts' | ||
|
||
jobs: | ||
benchmark: | ||
name: Run Benchmarks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.x' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install -C scripts/benchmarks | ||
pnpm install -C scripts/radashi-db | ||
- uses: awalsh128/[email protected] | ||
with: | ||
packages: valgrind | ||
version: 1 # The “cache version” for cache-busting | ||
|
||
- name: Run benchmarks | ||
env: | ||
RADASHI_BOT_TOKEN: ${{ secrets.RADASHI_BOT_TOKEN }} | ||
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | ||
run: | | ||
# https://pythonspeed.com/articles/consistent-benchmarking-in-ci/ | ||
valgrind --tool=cachegrind ./scripts/benchmarks/node_modules/.bin/tsx ./scripts/benchmarks/ci-bench-pr.ts ${{ github.base_ref }} ${{ github.event.number }} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Seed Benchmarks | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
seed-benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22.x' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install -C scripts/benchmarks | ||
pnpm install -C scripts/radashi-db | ||
- uses: awalsh128/[email protected] | ||
with: | ||
packages: valgrind | ||
version: 1 # The “cache version” for cache-busting | ||
|
||
- name: Run benchmarks and seed database | ||
env: | ||
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | ||
run: | | ||
# https://pythonspeed.com/articles/consistent-benchmarking-in-ci/ | ||
valgrind --tool=cachegrind ./scripts/benchmarks/node_modules/.bin/tsx ./scripts/benchmarks/seed-benchmarks.ts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,6 @@ | |
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.8.3", | ||
"@codspeed/vitest-plugin": "^3.1.0", | ||
"@typescript-eslint/parser": "^7.16.1", | ||
"@vitest/coverage-v8": "2.0.3", | ||
"concurrently": "^8.2.2", | ||
|
@@ -60,16 +59,11 @@ | |
"prettier-plugin-sh": "^0.14.0", | ||
"tsup": "^8.1.0", | ||
"typescript": "^5.5.2", | ||
"vitest": "2.0.2" | ||
"vitest": "2.0.5" | ||
}, | ||
"sideEffects": false, | ||
"browserslist": [ | ||
">0.1% and not dead", | ||
"node >= 16" | ||
], | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"@codspeed/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.