simplejsbench

0.1.1 • Public • Published

simplejsbench

A simple Javascript benchmark library.

simplejsbench

A simple Javascript benchmark library.

Installation

npm install simplejsbench --save

Usage

var Bench = require('simplejsbench');

new Bench() .setCount(5000) // Set iteration count .setArguments([7, 5]) // Set argument for the test function .setArgIndexOfIteration(0) // Set position of iterating number if needed .setStartValue(1) // Set starting value of iterating number if needed .runBench('isPrime Draft ', isPrime1) // Run benchmark for specified function .runBench('isPrime Improved ', isPrime2) .printBench() // Print Benchmark result .printResult() // Print return values for each test .validate(); // Compare result for each functions for validation.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.1.0 Initial release

Readme

Keywords

Package Sidebar

Install

npm i simplejsbench

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • dilly97