benchmarkjs-pretty

Tiny wrapper around benchmarkjs with a simpler api

MIT 5 个版本
安装
npm install benchmarkjs-pretty
yarn add benchmarkjs-pretty
pnpm add benchmarkjs-pretty
bun add benchmarkjs-pretty
README

Benchmarkjs pretty

This library is a tiny wrapper around the popular benchmarkjs but with a nicer api. It's always a bit cumbersome to specify the cycle and complete functions in each project where benchmarking is done.

Installation

# npm
npm install --save-dev benchmarkjs-pretty

# yarn
yarn add --dev benchmarkjs-pretty

Usage

import Benchmark from "benchmarkjs-pretty";

new Benchmark()
  .add("foo", myFunction)
  .add("bar", myOtherFunction)
  .run() // Returns promise

License

MIT, see LICENSE.

版本列表
2.0.1 2020-10-11
2.0.0 2017-10-04
1.0.2 2017-07-03
1.0.1 2017-07-02
1.0.0 2017-07-02