1.2.6 • Published 8 years ago

nperf v1.2.6

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

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.

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago