graphql-js icon indicating copy to clipboard operation
graphql-js copied to clipboard

feat: CodSpeed Benchmarks

Open erikwrede opened this issue 1 year ago • 7 comments

Summary

As discussed on the discord #wg channel, this is the prototype for CodSpeed benchmarks using vitest.

Some of the benchmarks we currently have may not be suitable for CodSpeeds instrumentation and may still provide variance in results. CodSpeed, for now, is just meant as to supplement the fully-fledged benchmark suite to prevent accidental regressions and get a quick impact overview on each PR. We are always able to remove certain benchmarks from the CodSpeed suite and keep them in the more powerful main benchmark suite.

Additionally, the introduction of vitest for benchmarking provides a path forward to using vitest for the tests, too

A sample run of CodSpeed on my fork can be found here: https://github.com/erikwrede/graphql-js/pull/3#issuecomment-2419972419

Changes in this PR

  • Add Codspeed
  • Add Vitest
  • remove @types/chai because Vitest bundles it, no other way I'm aware of to fix this unfortunately - no impact on development
  • Refactor all benchmarks as CodSpeed+Vitest benchmarks
  • Add Github Workflows

Administrative steps before merging

  • Setup CodSpeed for this Repo (codspeed.io)
  • Add the necessary tokens https://docs.codspeed.io/ci/github-actions

erikwrede avatar Oct 17 '24 16:10 erikwrede