0.0.7 • Published 4 years ago

nano-performance v0.0.7

Weekly downloads
85
License
MIT
Repository
github
Last release
4 years ago

nano-performance

An extremely lightweight node module that measures execution time in nanoseconds.

Created by Agilit-e

Installation

Using npm:

npm install nano-performance

Display output in milliseconds (default):

const nano = require('nano-performance')

nano.timeStart('Test')

setTimeout(function() {
  nano.timeEnd('Test')
}, 10)

Output = Test: 11.086301 ms

Display output in nanoseconds:

const nano = require('nano-performance')

nano.timeStart('Test')

setTimeout(function() {
  nano.timeEnd('Test', 'ns')
}, 10)

Output = Test: 11086301 ns