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

Make metric.Gauge a float64 #11

Closed
nightlyone opened this issue Feb 28, 2015 · 2 comments
Closed

Make metric.Gauge a float64 #11

nightlyone opened this issue Feb 28, 2015 · 2 comments

Comments

@nightlyone
Copy link

Rationale: Gauges are measured in various accuracies and are difficult to rescale later once you already have collected data. The performance impact seems negligible, since we only Set and Add Gauges. Doubling the memory consumption per Gauge seems worth the result.

@peterbourgon
Copy link
Member

Originally Gauge was float64, but I changed to int64 after reviewing codahale/metrics. I like the integer consistency of the metrics interfaces, especially as e.g. Histograms are implemented in terms of Gauges in some places. And I can't think of many (any?) things that are Gauge-able that can't be reduced to integers. Can you link me to some code in the wild that requires Gauges-as-floats?

@peterbourgon
Copy link
Member

Closed pending further comments...

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