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

measured-core

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

measured-core

A Node library for measuring and reporting application-level metrics.

  • 1.51.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
275K
increased by76.84%
Maintainers
2
Weekly downloads
 
Created

What is measured-core?

The measured-core npm package provides a set of tools for measuring and monitoring various metrics in your Node.js applications. It includes features for creating counters, histograms, meters, and timers, which can be used to track performance and other metrics.

What are measured-core's main functionalities?

Counter

Counters are used to count events. You can increment or decrement the counter and retrieve the current count.

const { Counter } = require('measured-core');
const counter = new Counter();
counter.inc();
counter.dec();
console.log(counter.toJSON());

Histogram

Histograms measure the distribution of values in a stream of data. You can update the histogram with new values and retrieve statistical information about the distribution.

const { Histogram } = require('measured-core');
const histogram = new Histogram();
histogram.update(1);
histogram.update(2);
histogram.update(3);
console.log(histogram.toJSON());

Meter

Meters measure the rate of events over time. You can mark events and retrieve the rate of events per second.

const { Meter } = require('measured-core');
const meter = new Meter();
meter.mark();
meter.mark(2);
console.log(meter.toJSON());

Timer

Timers measure the duration of events. You can start and stop the timer to measure how long an operation takes and retrieve statistical information about the durations.

const { Timer } = require('measured-core');
const timer = new Timer();
const end = timer.start();
setTimeout(() => {
  end();
  console.log(timer.toJSON());
}, 1000);

Other packages similar to measured-core

FAQs

Package last updated on 05 Sep 2019

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