🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

benchmark-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

benchmark-cli

CLI application to benchmark JavaScript files.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source


benchmark-cli
API stability Standard NPM version Downloads

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!

Keywords

benchmark

FAQs

Package last updated on 03 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts