| 460 | } |
| 461 | |
| 462 | bool 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 | |
| 484 | bool hdr_record_values_atomic(struct hdr_histogram* h, int64_t value, int64_t count) |
| 485 | { |
no test coverage detected