An open API service indexing awesome lists of open source software.

https://github.com/jchip/node-bench

node.js benchmark
https://github.com/jchip/node-bench

Last synced: over 1 year ago
JSON representation

node.js benchmark

Awesome Lists containing this project

README

          

# node-bench

node.js benchmark

API reference:

```js
import { Suite } from "@jchip/bench";

const suite = new Suite();

await suite
.add("test 1", async () => {
return Promise.resolve(1);
})
.add("test 2", async () => {
return Promise.resolve(2);
})
.on("cycle", ({ result }) => {
console.log(result);
})
.on("complete", results => {
console.log(results);
})
.run();
```