@benchtop/benchtop
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

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

Package Sidebar

Install

npm i @benchtop/benchtop

Weekly Downloads

3

Version

0.2.5

License

MIT

Unpacked Size

6.99 kB

Total Files

6

Last publish

Collaborators

  • kochie