-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable codspeed performance measuring in CI
- Loading branch information
1 parent
be6c7e7
commit 6ef36bd
Showing
6 changed files
with
469 additions
and
316 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
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,26 @@ | ||
import { withCodSpeed } from '@codspeed/tinybench-plugin'; | ||
import { Bench } from 'tinybench'; | ||
import { PerformanceTest } from './PerformanceTest'; | ||
import { makeTests } from './tests'; | ||
|
||
const bench = withCodSpeed(new Bench({ | ||
warmupIterations: 0, | ||
iterations: 1, | ||
})); | ||
const dimension = 64; | ||
const scope = 'all'; | ||
|
||
for (const test of makeTests(true)) { | ||
if (test.name !== 'N3Store') { | ||
bench.add(test.name, async() => { | ||
await new PerformanceTest([ test ], dimension).run(scope); | ||
}); | ||
} | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
(async function() { | ||
await bench.run(); | ||
// eslint-disable-next-line no-console | ||
console.table(bench.table()); | ||
})(); |
Oops, something went wrong.