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

Function hdr_record_values

deps/hdr_histogram/hdr_histogram.c:462–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462bool hdr_record_values(struct hdr_histogram* h, int64_t value, int64_t count)
463{
464 int32_t counts_index;
465
466 if (value < 0)
467 {
468 return false;
469 }
470
471 counts_index = counts_index_for(h, value);
472
473 if (counts_index < 0 || h->counts_len <= counts_index)
474 {
475 return false;
476 }
477
478 counts_inc_normalised(h, counts_index, count);
479 update_min_max(h, value);
480
481 return true;
482}
483
484bool hdr_record_values_atomic(struct hdr_histogram* h, int64_t value, int64_t count)
485{

Callers 3

hdr_record_valueFunction · 0.85
hdr_addFunction · 0.85

Calls 3

counts_index_forFunction · 0.85
counts_inc_normalisedFunction · 0.85
update_min_maxFunction · 0.85

Tested by

no test coverage detected