Skip to content

chunpu/min-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

min-bench

Build status NPM version Downloads Dependency Status

Test coverage Gittip

Simple Benchmark for Javascript Code

Installation

npm i min-bench

Usage

var b = require('min-bench')

b('code in with', function(n) {
	for (var i = 0; i < n; i++) {
		with (Math) {
			var a = floor(1.234)
		}
	}
})

// =>
//	code in with	645.59 ns/op

min-bench always make your code run more than 1 second

Output the duration of running the code one time

  • s second
  • ms = 0.001 s
  • µs = 0.001 ms
  • ns = 0.000001 ms

See more benchmark in demo.js

License

License

About

Simple Benchmark for Javascript Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published