New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@benchtop/benchtop

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@benchtop/benchtop

JS/TS library for benchmarking code

  • 0.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 09 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc