You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi 👋🏻
Thank you for adding the ability to run benchmarking inside of Vitest, it's 🔥
In the documentation for benchmark outputfile the json reporter was mentioned as the only way to output benchmark results and compare against previous results via the compare option However, when I follow the instructions to configure my vitest benchmarks I get this error
Error: Failed to load custom Reporter from json
Additionally, I noticed that the BenchmarkBuiltinReporters only include "default" and "verbose" and both don't seem to allow us to output benchmark results into a file.
I would like to be able to export the benchmark results and compare them to a previous run if possible
It looks like the documentation of benchmark.outputFile is a little outdated. For comparison, you need to use benchmark.outputJson and benchmark.compare combo as shown in https://vitest.dev/config/#benchmark-outputJson
# save main branch's result
git checkout main
vitest bench --outputJson main.json
# change a branch and compare against main
git checkout feature
vitest bench --compare main.json
Technically, you can put a same file to both options like below, but this will always overwrite bench.json, so that's a bit different from the intended usage.
Describe the bug
Hi 👋🏻
Thank you for adding the ability to run benchmarking inside of Vitest, it's 🔥
In the documentation for benchmark outputfile the
json
reporter was mentioned as the only way to output benchmark results and compare against previous results via the compare option However, when I follow the instructions to configure my vitest benchmarks I get this errorAdditionally, I noticed that the
BenchmarkBuiltinReporters
only include "default" and "verbose" and both don't seem to allow us to output benchmark results into a file.I would like to be able to export the benchmark results and compare them to a previous run if possible
Reproduction
run
npm run bench
https://stackblitz.com/edit/vitest-dev-vitest-1qwwb1?file=vite.config.ts
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: