Skip to content

Commit 1cf24a0

Browse files
nodejs-github-botrichardlau
authored andcommitted
deps: update histogram to 0.11.9
PR-URL: #59689 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 673a48f commit 1cf24a0

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

‎deps/histogram/include/hdr/hdr_histogram_version.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
#ifndefHDR_HISTOGRAM_VERSION_H
88
#defineHDR_HISTOGRAM_VERSION_H
99

10-
#defineHDR_HISTOGRAM_VERSION "0.11.8"
10+
#defineHDR_HISTOGRAM_VERSION "0.11.9"
1111

1212
#endif// HDR_HISTOGRAM_VERSION_H

‎deps/histogram/src/hdr_histogram.c‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ static int32_t buckets_needed_to_cover_value(int64_t value, int32_t sub_bucket_c
341341
/* ## ## ######## ## ## ####### ## ## ## */
342342

343343
inthdr_calculate_bucket_config(
344-
int64_tlowest_discernible_value,
345-
int64_thighest_trackable_value,
346-
intsignificant_figures,
347-
structhdr_histogram_bucket_config*cfg)
344+
int64_tlowest_discernible_value,
345+
int64_thighest_trackable_value,
346+
intsignificant_figures,
347+
structhdr_histogram_bucket_config*cfg)
348348
{
349349
int32_tsub_bucket_count_magnitude;
350350
int64_tlargest_value_with_single_unit_resolution;
@@ -406,10 +406,10 @@ void hdr_init_preallocated(struct hdr_histogram* h, struct hdr_histogram_bucket_
406406
}
407407

408408
inthdr_init(
409-
int64_tlowest_discernible_value,
410-
int64_thighest_trackable_value,
411-
intsignificant_figures,
412-
structhdr_histogram**result)
409+
int64_tlowest_discernible_value,
410+
int64_thighest_trackable_value,
411+
intsignificant_figures,
412+
structhdr_histogram**result)
413413
{
414414
int64_t*counts;
415415
structhdr_histogram_bucket_configcfg;
@@ -492,13 +492,12 @@ bool hdr_record_values(struct hdr_histogram* h, int64_t value, int64_t count)
492492
{
493493
int32_tcounts_index;
494494

495-
if (value<0)
495+
if (value<0||h->highest_trackable_value<value)
496496
{
497497
return false;
498498
}
499499

500500
counts_index=counts_index_for(h, value);
501-
502501
if (counts_index<0||h->counts_len <= counts_index)
503502
{
504503
return false;
@@ -514,7 +513,7 @@ bool hdr_record_values_atomic(struct hdr_histogram* h, int64_t value, int64_t co
514513
{
515514
int32_tcounts_index;
516515

517-
if (value<0)
516+
if (value<0||h->highest_trackable_value<value)
518517
{
519518
return false;
520519
}

0 commit comments

Comments
 (0)