
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
performancemeter
Advanced tools
A simple JavaScript performance meter.
$ npm install performancemeterconst Meter = require('performancemeter');
// Optional
// Meter.name('Bla bla bla');
// NEW: restricts output data
// Meter.multiple();
// Optional, default: "medium" (other types: "veryeasy", "easy", "medium", "hard", "veryhard")
Meter.mode('easy');
// or sets 10 cycles, veryeasy === 100, easy = 100000, medium = 10000000, hard = 10000000000
Meter.mode(10);
// Meter.measure(TEST_NAME, function_test, [function_init]);
// @TEST_NAME {String}
// @function_test {Function}
// @function_init {Function} optional, can contains init values
// Example 1:
Meter.measure('String.indexOf()', 'str.indexOf("meter")', 'var str = "Performance meter"');
Meter.measure('RegExp.test()', 'reg.test(str)', 'var reg = /meter/; var str = "Performance meter');
// Example 2:
Meter.measure('String.indexOf()', () => str.indexOf('meter'), 'var str = "Performance meter"');
Meter.measure('RegExp.test()', () => reg.test(str), 'var reg = /meter/; var str = "Performance meter"');
// Example 3:
Meter.measure('String.indexOf()', function() {
str.indexOf('meter');
}, function() {
var str = 'Performance meter';
});
Meter.measure('RegExp.test()', function() {
reg.test(str);
}, function() {
var reg = /meter/;
var str = 'Performance meter';
});
// Async example:
Meter.measure('nextTick', function() {
process.nextTick(NEXT);
});
Meter.measure('immediate', function() {
setImmediate(NEXT);
});
FAQs
A simple JavaScript code performance meter
The npm package performancemeter receives a total of 2 weekly downloads. As such, performancemeter popularity was classified as not popular.
We found that performancemeter 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.