Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Expand Sample documentation #10

Closed
Closed
@abh

Description

@abh

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 as metrics.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions