perf-testing/README.md
This directory contains performance testing tools for Immer, allowing you to benchmark different versions of Immer and analyze CPU profiles to identify performance bottlenecks.
Install dependencies (in this directory):
yarn install
Build Immer first:
yarn build-immer
Build the benchmark bundle:
yarn build
Alternately, you can rebuild both Immer and the benchmarking script:
yarn build-with-latest
To run the performance benchmarks:
# Run basic benchmarks, with relative version speed comparisons
yarn benchmark
# Run the benchmarks, but also generate a CPU profile
yarn profile
After running yarn profile, you'll get a .cpuprofile file. To analyze it:
# Analyze the most recent profile
yarn analyze-profile your-profile.cpuprofile
process.env overheadThe benchmarks compare:
../dist)