1.1.0 • Published 8 years ago

benchmark-cli v1.1.0

Weekly downloads
11
License
MIT
Repository
github
Last release
8 years ago

Quickly run some benchmarks from the CLI. Supports requiring dependencies and uses benchmark.js internally.

Installation

npm install benchmark-cli -g

Examples

Single file

$ benchmark ./test/example1.js
✔ example1 x 83,285 ops/sec ±0.83% (86 runs sampled)

Glob of files

$ benchmark ./test/*.js
✔ example1 x 84,518 ops/sec ±0.90% (87 runs sampled)
✔ example2 x 1,612,805 ops/sec ±1.81% (80 runs sampled)

Evaluate script

$ benchmark -e "for (var i = 1000; i--;);"
✔ eval-1 x 244,076 ops/sec ±1.17% (86 runs sampled)

Evaluate multiple scripts

$ benchmark -e "1 + 1" -e "1 + 2"
✔ eval-1 x 1,561,524 ops/sec ±2.24% (77 runs sampled)
✔ eval-2 x 1,633,941 ops/sec ±1.76% (82 runs sampled)

Contributions

Please feel free to create a PR!

1.1.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.0

8 years ago