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

Histogram metric does not keep a moving average #93

Open
ATGardner opened this issue Jul 5, 2017 · 1 comment
Open

Histogram metric does not keep a moving average #93

ATGardner opened this issue Jul 5, 2017 · 1 comment

Comments

@ATGardner
Copy link

When checking out the Histogram custom metric, I see that the default value just uses a mean value over all the values I send. There is no bias towards the last 5 minutes.
Digging through the code I see it has an _ema value, which might be what I need (I'm not sure about the alpha selection), but I couldn't find any way to send that value to keymetrics.
How can I get a histogram that is biased towards the last 5 minutes?

@alavit-d
Copy link
Contributor

alavit-d commented Jul 5, 2017

Hey, thanks for the good catch.

Here are the avalaible options for the measurement values:

Options

measurement option can be:

  • min: The lowest observed value.
  • max: The highest observed value.
  • sum: The sum of all observed values.
  • variance: The variance of all observed values.
  • mean: The average of all observed values.
  • stddev: The stddev of all observed values.
  • count: The number of observed values.
  • median: 50% of all values in the resevoir are at or below this value.
  • p75: See median, 75% percentile.
  • p95: See median, 95% percentile.
  • p99: See median, 99% percentile.
  • p999: See median, 99.9% percentile.

The ema option was used internally and cannot be called simply from pmx on this version, I will push a new version where you can call it.

In the meanwhile if this is relevant to your use case, you can use the median which will hit the biaised reservoir.

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

2 participants