@codspeed/vitest-plugin
and vitest
(if not already installed):
vitest
v1.2.2 and above.vitest
suite "fibo"
with two benchmarks, benching our
fibonacci
function for 10 and 15.vitest.config.ts
file to use the CodSpeed runner:
pnpm
):
Failed to resolve "@codspeed/vitest-plugin" from "vitest.config.ts"
, you might
need to rename the vitest.config.ts
file to vitest.config.mts
.You can find more information in the
Vite documentation on importing ESM package.vitest
since the instrumentation is only available
in the CI environment for now.
You can now
run those benchmarks in your CI to get
consistent performance measurements.
main
branch and every
pull request:
shard
options from vitest.
For example with pnpm
on Github Actions: