pmx icon indicating copy to clipboard operation
pmx copied to clipboard

Pmx metric average over 60 secods

Open pankleks opened this issue 8 years ago • 0 comments

I'm not sure I understand how this works:

export const cacheReloadAvg = pmxProbe.meter({
    name: "cache reload",
    seconds: 60
});

I would assume setting mark() twice over 60 second period should return value = 1 as 2 / 2 = 1 After 60 seconds passed, value should be reset, and counting starts again.

Apparently it's not.

Maybe I'm using wrong probe type. My target is to calculate average response time, but I don't want to keep calculating average forever, I would like to reset it after 60 seconds.

export const avgResponseTime= pmxProbe.meter({
    name: "avg response time",
    seconds: 60
});
...
avgResponseTime.mark(duration_ms);

Thanks.

pankleks avatar Dec 01 '17 10:12 pankleks