-
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 8346122
Showing
6 changed files
with
470 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,27 @@ | ||
import { withCodSpeed } from '@codspeed/tinybench-plugin'; | ||
import { Bench } from 'tinybench'; | ||
import { PerformanceTest } from './PerformanceTest'; | ||
import { makeTests } from './tests'; | ||
|
||
const bench = withCodSpeed(new Bench({ | ||
iterations: 1, | ||
})); | ||
const dimension = 64; | ||
const scope = 'all'; | ||
|
||
for (const test of makeTests(true)) { | ||
if (test.name !== 'N3Store') { | ||
bench.add(test.name, async() => { | ||
if ((<any> test.options).options.dictionary.encodings().next().value === undefined) { | ||
await new PerformanceTest([test], dimension).run(scope); | ||
Check failure on line 16 in perf/benchmark.ts GitHub Actions / lint
|
||
} | ||
}); | ||
} | ||
} | ||
|
||
// 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.