A simple benchmark for Storybook. Usage:
npx playwright install
npx @storybook/bench 'npx sb init'
This will:
- Install playwright browsers (unnecessary if you've already installed playwright on your machine)
- Install storybook using
sb init(or whatever command is provided)- Measure install time and size
- Start
- Measure build time
- Measure page load time
- Build
- Measure build time
- Browse
- Measure page load time
- Measure bundle sizes
It outputs all results to the files bench.csv and bench.json. It uploads results to a BigQuery data warehouse if SB_BENCH_UPLOAD and GCP_CREDENTIALS environment variables are set.
It also accepts the following flags:
| option | description |
|---|---|
| --label | Save as .csv/json and upload with if SB_BENCH_UPLOAD is true |
| --no-install | Do not measure storybook install time |
| --no-start | Do not measure storybook start time |
| --no-browse | Do not measure storybook browse time |
And consumes the following environment variables:
| variable | description |
|---|---|
| SB_BENCH_UPLOAD | Upload results to GCP if set to tue |
| GCP_CREDENTIALS | For upload, the GCP credentials to use as stringified JSON |
| CIRCLE_BRANCH | For upload, the branch if running in Circle CI |
| CIRCLE_SHA1 | For upload, the commit hash if running in Circle CI |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
