-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into st/docs/migrate-types-snippets
- Loading branch information
Showing
14 changed files
with
632 additions
and
421 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,5 @@ | ||
--- | ||
"@internal/benchmarks": patch | ||
--- | ||
|
||
chore: run benchmarking utility in devnet environment |
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,27 @@ | ||
name: "Bench Devnet" | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/* | ||
|
||
jobs: | ||
benchmarks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: CI Setup | ||
uses: ./.github/actions/test-setup | ||
|
||
- name: Pretest | ||
run: pnpm pretest | ||
|
||
- name: Run Node benchmarks | ||
uses: CodSpeedHQ/action@v3 | ||
with: | ||
run: pnpm bench:node | ||
token: ${{ secrets.CODSPEED_TOKEN }} | ||
env: | ||
DEVNET_WALLET_PVT_KEY: ${{ secrets.DEVNET_WALLET_PVT_KEY }} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Benchmarks | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
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
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,17 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
|
||
import { bench } from 'vitest'; | ||
|
||
export const isDevnet = process.env.DEVNET_WALLET_PVT_KEY !== undefined; | ||
|
||
const iterations = isDevnet ? 1 : 10; | ||
|
||
export const runBenchmark = (name: string, benchmarkFn: () => Promise<void>) => { | ||
bench( | ||
isDevnet ? name : `${name} (x${iterations} times)`, | ||
async () => { | ||
await benchmarkFn(); | ||
}, | ||
{ iterations } | ||
); | ||
}; |
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
Oops, something went wrong.