1.0.0 • Published 7 years ago

bench-press v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

bench-press npm.io npm.io

Benchmark operations

Use

import benchpress from 'bench-press';

console.log(
    benchpress(() => myFunction())
);

// Running 1000 times took 54ms

Options

Message

console.log(
    benchpress(
        () => myFunction(),
        {
            message: 'myFunction ✖ ${iterations} = ${duration}',
        }
    )
);

// myFunction ✖ 1000 = 54

Iterations

console.log(
    benchpress(
        () => myFunction(),
        {
            iterations: 1e5,
        }
    )
);

// Running 100000 times took 54ms
1.0.0

7 years ago

0.1.0

7 years ago

0.0.1

8 years ago