| 663 | } |
| 664 | |
| 665 | double hdr_mean(const struct hdr_histogram* h) |
| 666 | { |
| 667 | struct hdr_iter iter; |
| 668 | int64_t total = 0; |
| 669 | |
| 670 | hdr_iter_init(&iter, h); |
| 671 | |
| 672 | while (hdr_iter_next(&iter)) |
| 673 | { |
| 674 | if (0 != iter.count) |
| 675 | { |
| 676 | total += iter.count * hdr_median_equivalent_value(h, iter.value); |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | return (total * 1.0) / h->total_count; |
| 681 | } |
| 682 | |
| 683 | double hdr_stddev(const struct hdr_histogram* h) |
| 684 | { |
no test coverage detected