Socket
Socket
Sign inDemoInstall

benjmark

Package Overview
Dependencies
7
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    benjmark

Super-simple benchmarking library with clean API


Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Install size
43.9 kB
Created
Weekly downloads
 

Readme

Source

benjmark Build Status

Super-simple benchmarking library with clean API

Install

$ npm install --save benjmark

Usage

const Benjmark = require('benjmark');

const benjmark = new Benjmark();

benjmark.start();

function longRunningProcess() {
    // ...
}

benjmark.end();

Benjmark With Labels

Benjmark will let you assign labels to your benchmarks for more semantic logging. The console will assign different colors to multiple labels. If no label is assigned, then benjmark assigns numbers.

benjmark.start('label01');
benjmark.end();

benjmark.start('label02');
benjmark.end();

Labels

API

Benjmark()

The Benjmark class.

benjmark.start(label)

Type: string

Optional labeling of your individual benjmarks to the console.

benjmark.end()

End the benjmark process and restart the timer for your next benjmark.

License

MIT © Michael Wuergler

Keywords

FAQs

Last updated on 03 Jan 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc