New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

Simple and pretty convinient class to make simple benches like a process duration, etc...

2.0.0-beta.1
latest
npm
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

@coffeekraken/s-bench

MIT 2.0.0-alpha.20 - Git repository

size downloads license discord

Simple and pretty convinient class to make simple benches like a process duration, etc...

Install

npm i @coffeekraken/s-bench

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';
const bench = new __SBench('myCoolProcess');
// something...
bench.step('afterSomething');
// something else...
bench.end().log();

API

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

Settings
SBenchSettingsInterface
title

Specify a title for your bench that will be used in the log

body

Specify a body for your bench that will be used in the log

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Here's all the ways you can contact us listed:

discord email

FAQs

Package last updated on 15 Sep 2023

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