brayniac / histogram

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

the trait `core::cmp::Ord` is not implemented for the type `histogram::HistogramBucket` #1

Closed posix4e closed 9 years ago

posix4e commented 9 years ago

Could this be based on the id?

brayniac commented 9 years ago

I'm curious about use-case for this. Should be a trivial change. But is a bucket less than another if its id is lower (and thus the value)? Or if the count is lower?

I need to give this some more thought. Having a clear use-case to consider will help. Is there any reason not to compare the buckets by id or count directly depending on intent?

On Thu, Sep 3, 2015, 5:42 PM Alex Newman notifications@github.com wrote:

Could this be based on the id?

— Reply to this email directly or view it on GitHub https://github.com/brayniac/histogram/issues/1.

posix4e commented 9 years ago

Actually this would be for calculating min,max,stddev,etc

brayniac commented 9 years ago

There's no total ordering of buckets that makes sense as a default. I'm unwilling to implement an order when the semantics are unclear.

posix4e commented 9 years ago

Sounds good thanks for you attention!