Hit the mark with your benchmarks. https://riveragroup.github.io/benchmarksman/

Kyle P Davis bf71fae413 tweak jshint config 10 years ago
example ba3951eee9 add docs, maths example, and mocha 11 years ago
lib caa5ec81cb fix up pkg for running benchmarks and tests 10 years ago
test caa5ec81cb fix up pkg for running benchmarks and tests 10 years ago
.gitignore a91e7cbb78 clean .gitignore 10 years ago
.jshintrc bf71fae413 tweak jshint config 10 years ago
README.md ba3951eee9 add docs, maths example, and mocha 11 years ago
benchmarksman.js caa5ec81cb fix up pkg for running benchmarks and tests 10 years ago
main.js caa5ec81cb fix up pkg for running benchmarks and tests 10 years ago
package.json caa5ec81cb fix up pkg for running benchmarks and tests 10 years ago

README.md

benchmarksman

A handy wrapper around benchmark.js to make writing benchmarks as easy as writing test cases (using the mocha exports UI).

Why

Using benchmark.js directly can be a little annoying if you just want it to log ops/sec for a bunch of different code snippets.

Usage

Command Line

benchmarksman bench/array.js

Programmatic

exports.Maths = {
	"multiply": function(){
		return 2 + 2;
	},
	"divide": function(){
		return 42 / 11;
	}
};
if (!module.main) require("benchmarksman").runner(exports);

Results