This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

nperf

1.2.6 • Public • Published

nperf

Build Status Codacy Badge Codacy Badge

A minimalistic performance measurement util for Node.js.

Install

npm install nperf

Usage

Just require nperf and define your test cases.

const nperf = require('nperf');
 
nperf()
    .test('Spread-Operator', () => {
        const b = [4, 5, 6];
 
        [1, 2, 3, ...b];
    })
    .test('Array.prototype.concat', () => {
        const a = [1, 2, 3];
 
        a.concat([4, 5, 6]);
    })
    .run();

Console output

Spread-Operator vs. Array.prototype.concat
1. Array.prototype.concat 2x (avg ~139.490ns)
2. Spread-Operator 1x (avg ~276.843ns)

API

TBD

Running tests

npm test

Coverage

npm install istanbul -g
npm run coverage

License

Released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i nperf

Weekly Downloads

0

Version

1.2.6

License

MIT

Last publish

Collaborators

  • spanitz