sbcmsbgithub / snappy

Automatically exported from code.google.com/p/snappy
Other
0 stars 0 forks source link

Picks the wrong median in the unit test #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The code says it all:

struct BenchmarkCompareCPUTime {
  bool operator() (const BenchmarkRun& a, const BenchmarkRun& b) const {
    return a.real_time_us < b.real_time_us;
  }
};

Also, it would be slightly more elegant to use nth_element than sort.

Original issue reported on code.google.com by se...@google.com on 5 May 2011 at 11:23

GoogleCodeExporter commented 9 years ago
Fixed in r35.

Original comment by se...@google.com on 9 May 2011 at 9:31