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

Function hdr_record_values_atomic

deps/hdr_histogram/hdr_histogram.c:484–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484bool hdr_record_values_atomic(struct hdr_histogram* h, int64_t value, int64_t count)
485{
486 int32_t counts_index;
487
488 if (value < 0)
489 {
490 return false;
491 }
492
493 counts_index = counts_index_for(h, value);
494
495 if (counts_index < 0 || h->counts_len <= counts_index)
496 {
497 return false;
498 }
499
500 counts_inc_normalised_atomic(h, counts_index, count);
501 update_min_max_atomic(h, value);
502
503 return true;
504}
505
506bool hdr_record_corrected_value(struct hdr_histogram* h, int64_t value, int64_t expected_interval)
507{

Callers 2

hdr_record_value_atomicFunction · 0.85

Calls 3

counts_index_forFunction · 0.85
update_min_max_atomicFunction · 0.85

Tested by

no test coverage detected