react/scripts/bench
Ivan a3e4d00089 Fixed typo (#13519) 2018-08-30 16:33:47 -07:00
..
benchmarks Minor typos fixed (#12005) 2018-01-11 12:24:49 +00:00
README.md Fix sample command in scripts/bench/README.md (#12853) 2018-05-18 09:18:35 +01:00
benchmark.js Run prettier on scripts/bench (#9671) 2017-05-11 16:14:17 -07:00
build.js Fixed typo (#13519) 2018-08-30 16:33:47 -07:00
package.json Pin lighthouse at 2.0.0 2017-12-04 13:23:30 +00:00
runner.js Fix benchmark runner (#11749) 2017-12-02 00:00:29 +00:00
server.js Fix a few typos (#10860) 2017-09-27 11:13:21 +01:00
stats.js Update prettier (#13205) 2018-07-17 20:18:34 +01:00
yarn.lock Pin lighthouse at 2.0.0 2017-12-04 13:23:30 +00:00

README.md

React Benchmarking

Commands

In most cases, the only two commands you might want to use are:

  • yarn start
  • yarn --cwd=../../ build core,dom-client --type=UMD_PROD && yarn start --skip-build

The first command will run benchmarks with all the default settings. A local and remote build will occur on React and ReactDOM UMD bundles, both local and remote repos will be run against all benchmarks.

The second command will run all benchmarks but skip the build process. This is useful for when doing local performance tweaking and the remote repo has already had its bundles built. Both local and remote repos will be run against all benchmarks with this command too.

The other commands are as follows:

# will compare local repo vs remote merge base repo
yarn start

# will compare local repo vs remote merge base repo
# this can significantly improve bench times due to no build
yarn start --skip-build

# will only build and run local repo against benchmarks (no remote values will be shown)
yarn start --local

# will only build and run remote merge base repo against benchmarks (no local values will be shown)
yarn start --remote

# will only build and run remote master repo against benchmarks
yarn start --remote=master

# same as "yarn start"
yarn start --remote --local

# runs benchmarks with Chrome in headless mode
yarn start --headless

# runs only specific string matching benchmarks
yarn start --benchmark=hacker