https://github.com/reduxjs/react-redux-benchmarks
Performance benchmark harness for React-Redux
https://github.com/reduxjs/react-redux-benchmarks
Last synced: 11 months ago
JSON representation
Performance benchmark harness for React-Redux
- Host: GitHub
- URL: https://github.com/reduxjs/react-redux-benchmarks
- Owner: reduxjs
- License: mit
- Created: 2018-09-04T02:50:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-03T07:54:44.000Z (over 1 year ago)
- Last Synced: 2025-03-30T21:11:11.238Z (about 1 year ago)
- Language: TypeScript
- Size: 2.53 MB
- Stars: 71
- Watchers: 5
- Forks: 22
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - react-redux-benchmarks - Redux | reduxjs | 64 | (JavaScript)
README
# react-redux-benchmarks
Performance benchmark harness for React-Redux
This repo expects that you are using Yarn for package management.
# Running benchmarks
```bash
yarn build
yarn start
```
After benchmarks have been built, you can run with simply:
```bash
yarn start
```
You'll need to rebuild the benchmarks after every code change.
## Running specific versions of react-redux
To specify a single version:
```bash
yarn start --versions 8.1.1
yarn start -v 8.1.1
```
To specify running against multiple versions:
```bash
yarn start -v 8.1.1 7.2.5
```
## To run a specific benchmark:
```bash
yarn start --scenarios deeptree
yarn start -s deeptree
```
or specific benchmarks:
```bash
yarn start -s deeptree forms
```
## Setting run length
By default, benchmarks run for 30 seconds. To change this, use
```bash
yarn start --length 5
yarn start -l 5
```
# Adding a benchmark
Benchmarks live in the `src/scenarios` directory. Each benchmark must render a React component like this:
```js
import { renderApp } from '../../common'
renderApp(, store)
```
Where `App` is your benchmark component, and `store` is your redux store.
If you need to make changes to the `fps-emit` package, bump the version number in its `package.json`,
then update each benchmark to use the newest version using `yarn upgrade-interactive` and selecting `fps-emit`
for an update. Then rebuild all the benchmarks using `yarn build`