Performance benchmark harness for React-Redux
Clone or download
markerikson React 16.6 updates (#13)
* Remove outdated versions of React-Redux

* Update fps-emit lockfile

* Simplify file copying logic

* Make tracing optional

* Restructure stockticker to use slices

* Remove unneeded UMDs from public folders

* Remove 995 branch builds

* Crank up tree updates

* Ignore copied UMDs

* Update to React 16.6

* Update all benchmarks to React 16.6

* Ensure react-dom UMD is loaded
Latest commit 535f498 Nov 6, 2018


Performance benchmark harness for React-Redux

Running benchmarks

npm run initialize
npm start

After benchmarks have been initialized, you can run with simply:

npm start

Running specific versions

To specify a single version:

REDUX=5.0.7 npm start

To specify running against multiple versions:

REDUX=5.0.7:4.4.9 npm start

To run a specific benchmark:

BENCHMARKS=stockticker npm start

or specific benchmarks:

BENCHMARKS=stockticker:another npm start

Setting run length

By default, benchmarks run for 30 seconds. To change this, use

SECONDS=10 npm start

Adding a benchmark

Benchmarks live in the sources/ directory. Each benchmark must insert this code into index.js:

import 'fps-emit'

In addition, a config-overrides.js must be created with these contents:

module.exports = function override(config, env) {
    //do stuff with the webpack config...
    console.log(`Environment: ${env}`)

    if(env === "production") {
        config.externals = {
            "react" : "React",
            "redux" : "Redux",
            "react-redux" : "ReactRedux",
            "fps-emit": "FpsEmit",

    return config;

and the scripts section of package.json should be changed to:

  "scripts": {
    "start": "react-app-rewired  start",
    "build": "react-app-rewired  build",
    "test": "react-app-rewired  --env=jsdom",

Also, index.html must be modified to include these lines:

    <script type="text/javascript" src="redux.min.js"></script>
    <script type="text/javascript" src="react.production.min.js"></script>
    <script type="text/javascript" src="react-redux.min.js"></script>
    <script type="text/javascript" src="fps-emit.min.js"></script>