yaorg/node-measured

Cannot use EWMA with Histogram

chrismikehogan opened this issue · 2 comments

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?

This issue might become a moot point once #28 is merged in

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