nano-performance
TypeScript icon, indicating that this package has built-in type declarations

1.0.1-rc-5 • Public • Published

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):

import { timeStart, timeEnd } from "nano-performance";

timeStart("Test");

setTimeout(function () {
  timeEnd("Test");
}, 10);

Output = Test: 11.086301 ms

Display output in nanoseconds:

import { timeStart, timeEnd } from "nano-performance";

timeStart("Test");

setTimeout(function () {
  timeEnd("Test", "ns");
}, 10);

Output = Test: 11086301 ns

Package Sidebar

Install

npm i nano-performance

Homepage

agilite.io

Weekly Downloads

21

Version

1.0.1-rc-5

License

MIT

Unpacked Size

7.15 kB

Total Files

13

Last publish

Collaborators

  • agilite