-
Notifications
You must be signed in to change notification settings - Fork 494
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
Expand Sample documentation #10
Comments
Yes, please offer more documentation.. I was just trying this with stathat / librato, and I had to read the code to figure out how to use the lib. Nice work tho. |
yes please. note that coda hale's "Sliding Window Reservoirs" doc says I report my metrics every second to graphite, and so i want my timers's min/max/percentiles/etc to be a reflection of the past second. (I would be happy with a solution wether it samples or not). |
@abh: the algorithm R was a bit easier to understand, but also doesn't seem to do what we want. I don't think either algorithm does what we want, although in the forward decay paper there's mention of a window-based decay. That seems to be what we need, but there's no implementation yet for it, that I can see. so maybe we should give that a shot. another thing I noticed, the R algorithm, once past the initial reservoirsize of samples uses a so I'm thinking of either attempting to implement the windowing variant of the forward decay function, |
Anyone fancy at least a simple PR improving the explanation for how that stuff works? Perhaps a brave soul that has read the paper? @Dieterbe |
(combining with #97 ) |
It'd be nice with a few lines in the readme of how to use the samples. I'm trying to get a "recent data" histogram, but using
metrics.NewExpDecaySample(600, 0.015)
gives me almost exactly the same data asmetrics.NewUniformSample(1800)
(I add data to the histogram once a second). I expected them to be less similar, so I'm wondering if I'm doing it wrong.Specifically then I expected Max/Min to "decay", too.
"since start" is the uniform sample, and "recent" is the ExpDecaySample from above:
http://ord1.ntppool.net:8053/status
Before I looked properly at the code and read the codahale documentation I also setup a version with three different uniformsamples (600, 3600 and 86400 reservoirs): http://zrh2.ntppool.net:8053/status -- this was useful for showing that at least for my use the reservoirsize doesn't seem to matter too much).
Would it make sense for me to implement a sliding window reservoir for my "what's the data been in the last X minutes" use? Since I only update the histogram once a second it's not that much data.
Anyway, a couple of lines in the documentation with recommendations for how and when to use the different sample types would be really helpful.
For reference my code updating the metrics is in https://github.com/abh/geodns/blob/master/metrics.go
The text was updated successfully, but these errors were encountered: