MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / hdr_mean

Function hdr_mean

deps/hdr_histogram/hdr_histogram.c:665–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663}
664
665double 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
683double hdr_stddev(const struct hdr_histogram* h)
684{

Callers 4

showLatencyReportFunction · 0.85
showThroughputFunction · 0.85
hdr_stddevFunction · 0.85
hdr_percentiles_printFunction · 0.85

Calls 3

hdr_iter_initFunction · 0.85
hdr_iter_nextFunction · 0.85

Tested by

no test coverage detected