
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
quick-bench
Advanced tools
JavaScript Quick Benchmark Tool
See ./package.json
Source available on GitHub or install module via NPM:
$ npm install quick-bench
After requiring quick-benchmark create a new instance. Call the start method, log some events, then call the end method and finally the results method to obtain quick benchmarks for JavaScript code.
var Benchmark = require('quick-bench')
var benchmark = new Benchmark()
benchmark.start() // time is recorded in ms
// todo some application code
benchmark.event('eventLabelOne')
benchmark.event('eventLabelOne') // events should occur many times to get useful benchmarks
// todo some more application code
benchmark.event('eventLabelTwo') // n number of events can be logged
// todo perhaps some more code
var results = benchmark.results() // automatically calls benchmark.end()
The above will set the results
variable equal to an object with the following format:
{
elapsedTime: milliseconds,
events: {
eventLabelOne: {
total: 2,
perSecond: total / (elapsedTime / 1000)
},
eventLabelTwo: {
total: 1,
perSecond: total / (elapsedTime / 1000)
},
}
}
That's it! As the module name implies this package is designed for quick benchmarks.
MIT
FAQs
JavaScript Quick Benchmark Tool
The npm package quick-bench receives a total of 2 weekly downloads. As such, quick-bench popularity was classified as not popular.
We found that quick-bench demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.