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

Kyle P Davis 5a7e597665 fix a few examples that use array ranges 12 лет назад
example 5a7e597665 fix a few examples that use array ranges 12 лет назад
lib ca6f250aea fix ctx issue in runner 12 лет назад
test caa5ec81cb fix up pkg for running benchmarks and tests 12 лет назад
.gitignore a91e7cbb78 clean .gitignore 12 лет назад
.jshintrc bf71fae413 tweak jshint config 12 лет назад
README.md eab1b161ae add dateGetTime example file and to the README 12 лет назад
benchmarksman.js caa5ec81cb fix up pkg for running benchmarks and tests 12 лет назад
main.js 5429138db4 misc jsdocs 12 лет назад
package.json caa5ec81cb fix up pkg for running benchmarks and tests 12 лет назад

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 tedious 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.Date = {
	"#getTime()": function(){
		new Date().getTime();
	},
	".now()": function(){
		Date.now();
	}
};
if (!module.main) require("benchmarksman").runner(exports);

Output

Date #getTime() x 7,705,532 ops/sec ±2.95% (94 runs sampled)
Date .now() x 15,132,312 ops/sec ±1.85% (94 runs sampled)