mobx-state-tree icon indicating copy to clipboard operation
mobx-state-tree copied to clipboard

Add a benchmark suite that pushes results to codspeed

Open thegedge opened this issue 6 months ago • 0 comments

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

thegedge avatar Aug 17 '24 15:08 thegedge