Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coffeekraken/s-bench

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coffeekraken/s-bench

  • 2.0.0-alpha.9
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

{{#> layout-readme }}

SBench

This SBench class allows you to know how many time take a certain part of your processes, with a concept of "steps" to split this even more when needed. Here's the features availables:

  • Track the time used by a portion of script
  • Display a summary of tracked times
  • Split your tracked portion into "steps" for more precision
  • Let the SBench related statements into your code and filter out which bench(s) you want to be active and which not

Usage

Here's how to use our implementation:

import __SBench from '@coffeekraken/s-bench';
// Using static methods
__SBench.start('myBench');
// do something here...
__SBench.step('myBench', 'myStep');
// do something more...
__SBench.end().log();

// Using instance
const bench = new __SBench('MyClass.doSomething');
bench.start();
// ...
bench.end().log();

// Filter our benches
__SBench.filter(['MyClass.*']);
// this accept glob patterns as filters like "MyClass.*"

API

For more information about the API of this class, please check our API documentation

Settings

{{> interface namespace='@coffeekraken.s-bench.shared.interface.SBenchSettingsInterface' }}

{{/ layout-readme }}

FAQs

Package last updated on 03 Aug 2022

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