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

Client side legend average calculated incorrectly? #3244

Closed
alechenninger opened this issue Nov 15, 2015 · 3 comments · Fixed by #3252
Closed

Client side legend average calculated incorrectly? #3244

alechenninger opened this issue Nov 15, 2015 · 3 comments · Fixed by #3252

Comments

@alechenninger
Copy link
Contributor

I know legend values are calculated client side, but it seems like even with client-side data it is inaccurate.

I have a metric with mostly null values and finite number of points (~30). The min (.85 sec) and max (5.01 sec) are correct, and total seems plausible (44.65 sec). The average (0.02 sec) however is nonsensical: it is drastically less than the minimum. The true average as determined server-side by graphite is 1.28 sec. The date range is 1 week.

Am I misunderstanding something about the limitations of the client side calculations? Otherwise it seems to me a simple summing up of known data points over the number of data points would produce a more accurate result. Not sure where 0.02 is coming from in that data.

Thanks!

@torkelo
Copy link
Member

torkelo commented Nov 16, 2015

avg is calculated client side, so if many values are null then then avg is going to seems strange compared to min value. Also if you want accurate legend values you need to set a consolidateBy graphite function (for example if you want max to be accurate you need to set consolidateBy(max), graphite will autumatically use avg as point consolidation function otherwise).

if you want ignore nulls, try keepLastValue function.

@torkelo torkelo closed this as completed Nov 16, 2015
@alechenninger
Copy link
Contributor Author

What about ignoring nulls in the client side average calculation?

@alechenninger
Copy link
Contributor Author

I don't want to change the graph with keepLastValue; the client side average calculation should ignore nulls IMHO, unless they are requested to be drawn as zeros.

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

Successfully merging a pull request may close this issue.

2 participants