perfmark
v1.1.6
Published
elegant benchmarking in node and typescript
Downloads
8
Maintainers
Readme
perfmark
elegant benchmarking in node & typescript based on benchmark
Highlights
- Written in Typescript
Installation
npm:
$ npm install perfmark --save-dev
yarn:
$ yarn add --dev perfmark
Usage
elegant benchmarking in node & typescript
const PerfMark = require('perfmark');
const fibonacci = (n) => {
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2)
}
const benchmark = new Perfmark();
benchmark
.add('test1', () =>{
fibonacci(1);
})
.add('test2', ()=> {
fibonacci(3)
})
.run()
License
MIT © Nivrith