Skip to content

Improve perf benchmarking system with more versions, scenarios, and output#1182

Merged
markerikson merged 8 commits intomainfrom
feature/more-perf-benchmarks
Oct 6, 2025
Merged

Improve perf benchmarking system with more versions, scenarios, and output#1182
markerikson merged 8 commits intomainfrom
feature/more-perf-benchmarks

Conversation

@markerikson
Copy link
Collaborator

This PR:

  • Adds structura and limu as supported versions in the perf benchmark system
  • Updates read-cpuprofile.js to read the latest .cpuprofile file by default if no filename arg is supplied
  • Adds a benchmark config object to consolidate some of the constants
  • Improves the filtering test to retain a specific percentage of items rather than only removing one item
  • Consolidates the freeze variable
  • Adds a bunch of new scenarios for many updates to existing state (so that we see what happens with already-frozen values) and a scenario that simulates many RTKQ API updates (pseudo pending + resolved actions tracking subscriptions)
  • Adds an AI-generated set of table outputs to the benchmarking script:
    • a consolidated results table where the scenarios are rows and versions are columns, so you can easily copy and paste results into an issue
    • specific comparisons per scenario between an existing immer10 version and the current branch's immer10Perf, with percent improvements per scenario (ie "immer10Perf is 27% faster than immer10 on scenario X"), and a final averaged overall perf improvement ("immer10Perf is average 42% faster than immer10")
    • a ranking of all the tested versions based on geometric mean, to give an overall result

This includes the scenarios from @riqts in #1179 and supersedes that PR - thank you, those were very helpful!

@coveralls
Copy link

Pull Request Test Coverage Report for Build 18286958114

Details

  • 0 of 1001 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-12.8%) to 41.966%

Changes Missing Coverage Covered Lines Changed/Added Lines %
perf-testing/read-cpuprofile.js 0 11 0.0%
perf-testing/immutability-benchmarks.mjs 0 990 0.0%
Totals Coverage Status
Change from base Build 18286060303: -12.8%
Covered Lines: 1236
Relevant Lines: 3660

💛 - Coveralls

@markerikson markerikson merged commit 40aa814 into main Oct 6, 2025
2 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 10.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants