New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

metricify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metricify

Metrics Done Easy

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

metricify

Metrics Done Easy

npm version dependencies Build Status Pledge To Arupex! lifetimeDownloadCount

Install

    npm install metricify --save

Usage

    function optionalCallbackOnAllMetersFinish(meterResult){
        console.log(JSON.stringify(meterResult, null, 3));
    }

    var Metrics = require('metricify');

    var factory = new Metrics(optionalCallbackOnAllMetersFinish);

    var myMeter = factory.meter('myMeter');

    //do some stuff
    for(var i = 0; i < 10000; ++i){}

    myMeter.end();


    //factory.getMeters(); returns meter min/max and data points

    //factory.calcMetrics(); //returns detailed stats using stats-lite
    
    

Promises

// creates a meter that starts at function call, and ends when promise is resolved
// lets you force the scope incase your function calls assuming some scope
factory.promiseMeter('my-meter-name', functionThatResultsInPromise, argumentsToFunctionCallAsArray, forceScope)

Keywords

metrics

FAQs

Package last updated on 06 Nov 2017

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