mobx-state-tree
mobx-state-tree copied to clipboard
Add a benchmark suite that pushes results to codspeed
What does this PR do and why?
This PR removes the existing perf tests in favour of benchmarks powered by benchmark.js, and decorated with codspeed. Codspeed is free for open source projects, and can keep track of results over time so we can find regressions. It will report on PRs to let contributors know the impact of their PR.
I've also pulled over most scenarios that @coolsoftwaretyler added to https://github.com/coolsoftwaretyler/mst-performance-testing
[TODO]
- [ ] Add GitHub action that will push results to codspeed
- [ ] Run the benchmarks with node
- [ ] Figure out if we can have the benchmarks import
mobx-state-tree
from a specific file vs../../src
Steps to validate locally
-
bun benchmark
to run all benchmarks -
bun run __benchmarks__/<something>.bench.mts
to run a specific benchmark