HdrHistogram / hdrhistogram-go

A pure Go implementation of Gil Tene's HDR Histogram.
MIT License
435 stars 64 forks source link

why int64 and not float64? #13

Closed mranney closed 8 years ago

mranney commented 8 years ago

Do you have any plans to add support for recording float64 values as well as ints, similar to the Java version?

StabbyCutyou commented 8 years ago

I'd wager a guess that int64 was chosen since it maps to the time.Duration type, which would be the easiest thing to use when mapping latencies.

I wonder if you could use something like go-generate to template out the Histogram, and then build a copy for both types?

codahale commented 8 years ago

int64s allow you to record latencies between 0 and ~292 years using nanosecond resolution, which strikes me as sufficient. I don't have any plans to add float64 support.