README
Benchmark
Library for code performance testing using Node.js
Installation
npm i @0x2e757/benchmark
Usage example
If used in JavaScript import as:
const benchmark = require("@0x2e757/benchmark");
If used in TypeScript import as:
import * as benchmark from "@0x2e757/benchmark";
Benchmark your code:
benchmark.test({
"case 1": () => {
// Some code
},
"case 2": () => {
// Another code
},
});