yaorg / node-measured

A Node metrics library for measuring and reporting application-level metrics, inspired by Coda Hale, Yammer Inc's Dropwizard Metrics Libraries
https://yaorg.github.io/node-measured/
MIT License
517 stars 52 forks source link

Cannot use EWMA with Histogram #26

Closed chrismikehogan closed 5 years ago

chrismikehogan commented 7 years ago
const measured = require('measured');

const metrics = measured.createCollection();

const ewmaTimer = metrics.timer('perf.(algo=ewma).getModel', {
        histogram: new measured.Histogram({
            sample: new measured.ExponentiallyMovingWeightedAverage()
        })
    }).start()

ewmaTimer.end();

ewmaTimer.toJSON(); // fall down go boom

Am I misunderstanding how this is supposed to be used?

chrismikehogan commented 7 years ago

This issue might become a moot point once https://github.com/felixge/node-measured/pull/28 is merged in

fieldju commented 5 years ago

Closing this issue, re-open if it is still valid.