@benchtop/benchtop
JS/TS library for benchmarking code
Last updated 4 months ago by kochie .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @benchtop/benchtop 
SYNC missed versions from official npm registry.

benchtop-js

Build

npm run build

Will build the library using rollup.

Note: I want to use @rollup/plugin-typescript but it doesn't support declaration files from what I can tell. So using rollup-plugin-typescript2 at the moment.

Using

As simple as importing the library and running the cli tool.

// functionToTest.bench.ts
import { bench } from "benchtop"
import { funcToTest } from "./funcToTest"

bench("Function I want to benchmark", (b: benchmark) => {
    for i := 0; i < b.N; i++ {
        funcToTest()
    }
})
npx benchtop

Current Tags

  • 0.2.5                                ...           latest (4 months ago)

3 Versions

  • 0.2.5                                ...           4 months ago
  • 0.2.4                                ...           4 months ago
  • 0.2.2                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (9)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |