Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pmx metric average over 60 secods #103

Open
pankleks opened this issue Dec 1, 2017 · 0 comments
Open

Pmx metric average over 60 secods #103

pankleks opened this issue Dec 1, 2017 · 0 comments

Comments

@pankleks
Copy link

pankleks commented Dec 1, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant