brayniac / histogram

rust histogram and percentile stats
Apache License 2.0
46 stars 4 forks source link

Why is histogram hardcoded to u64? #51

Open caiohamamura opened 4 years ago

caiohamamura commented 4 years ago

Can't histogram be generic and receive any type instead of being hardcoded to accept only u64?

brayniac commented 4 years ago

(sorry, I don't know how I missed the notification for this issue)

Yes, it can. This is just a very old crate and my use-case at the time only focused on u64. I have a different library I am using now that does use generics, but it's not published to crates.io yet.

fgadaleta commented 4 years ago

any update on the generic histogram (f64 and negative values)?

fgadaleta commented 4 years ago

I built histo_fp for int and float samples (and buckets) Check it out