
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
better-metrics
Advanced tools
This is an alternative port of Coda Hale's metrics library.
I created this because I did not like the existing metrics port, which makes too many (bad) assumptions that aren't present in the original library. However, this is not a 1:1 port either as I have tried to use node idioms for most things.
Here is a simple example that measures the requests / second for a http server:
var metrics = require('better-metrics'));
var meter = new metrics.Meter();
var http = require('http');
http.createServer(function(req, res) {
meter.mark();
res.end('Thanks');
}).listen(3000);
Now this just measures things, but does not give you any way to look at the results. But fear not, logging this information is really simple:
setTimeout(function() {
console.log(meter.toJSON());
}, 1000);
This will print something like this:
FAQs
This is an alternative port of Coda Hale's metrics library.
The npm package better-metrics receives a total of 0 weekly downloads. As such, better-metrics popularity was classified as not popular.
We found that better-metrics 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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.