Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.
/ zapshot Public archive

⚡ JavaScript benchmarking tool to help continuous performance optimization

License

Notifications You must be signed in to change notification settings

Leko/zapshot

Repository files navigation

zapshot

Greenkeeper badge npm license CircleCI codecov

JavaScript benchmarking tool.

zapshot is compare diff between before execution and after rather than find fastest function. To help performance optimization in your products continuously.

Please refer examples to help you to understand out concept.

zapshot

Install

npm i -g zapshot-cli

Requirement

  • Node.js 8+

Usage

$ zapshot --help
Options:
  --help           Show help                                           [boolean]
  --version        Show version number                                 [boolean]
  --init           Create initial metrics                              [boolean]
  --cache          Path of before metrics
                                           [string] [default: "./.zapshotcache"]
  --quiet, -q      Report only summary                [boolean] [default: false]
  --threshold, -t  Percentage of least significant difference (LSD)
                                                          [number] [default: 20]
  --step           Specify the number of iteration on each benchmark
                                                          [number] [default: 50]

Basic usage

zapshot --init benchmark.js # Create snapshot
# some optimization
zapshot benchmark.js # Compare with snapshot

If you want to update snapshots, please re-run zapshot --init benchmark.js.

Contribution

  1. Fork this repo
  2. Create your branch like fix-hoge-foo-bar add-hige
  3. Write your code
  4. Pass all checks (npm run lint && npm run flow && npm test)
  5. Commit with gitmoji
  6. Submit pull request to master branch

Development

git clone [email protected]:Leko/zapshot.git
cd zapshot
npm i
npm run bootstrap

License

This package under MIT license.

About

⚡ JavaScript benchmarking tool to help continuous performance optimization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •