phr
Pretty print ns/op from process.hrtime()
Install
$ npm install phr
Test
$ npm test
Usage
const phr = const ITER = 1e6 var h = process// benchmark ns/opfor var i = 0; i < ITER; i++ var a = {} aa = 1 ab = 2 h = processconsole// => bench 30.1 ns/op
API
PHR(h, ITER, places)
- h pass in process.hrtime
- ITER number of iterations
- places number of places to format
Author
Evan Lucas
License
MIT (See LICENSE
for more info)