| 95 | } |
| 96 | |
| 97 | static void combine_error_stats(error_stats & into, const error_stats & from) { |
| 98 | into.num_samples += from.num_samples; |
| 99 | into.total_error += from.total_error; |
| 100 | if (from.max_error > into.max_error) into.max_error = from.max_error; |
| 101 | for (size_t i=0; i<HISTOGRAM_BUCKETS; ++i) into.error_histogram[i] += from.error_histogram[i]; |
| 102 | } |
| 103 | |
| 104 | static double find_quantile(const error_stats & stats, double quantile) { |
| 105 | double sum = std::accumulate(std::begin(stats.error_histogram), std::end(stats.error_histogram), 0.0); |
no outgoing calls