From 0a40a09da5afe3dd68661e327b30fc274f7140a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Mon, 14 Oct 2024 11:09:03 +0200 Subject: [PATCH] Use const instead of -53 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: György Krajcsovits --- model/textparse/nhcbparse_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/model/textparse/nhcbparse_test.go b/model/textparse/nhcbparse_test.go index 3c828ca42..25f5732ce 100644 --- a/model/textparse/nhcbparse_test.go +++ b/model/textparse/nhcbparse_test.go @@ -178,7 +178,7 @@ foobar{quantile="0.99"} 150.1` }, { m: `hh{}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 1, Sum: 0.0, PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}}, @@ -199,7 +199,7 @@ foobar{quantile="0.99"} 150.1` }, { m: `hhh{}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 1, Sum: 0.0, PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}}, @@ -329,7 +329,7 @@ foobar{quantile="0.99"} 150.1` }, { m: `baz{}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 17, Sum: 324789.3, PositiveSpans: []histogram.Span{{Offset: 1, Length: 1}}, // The first bucket has 0 count so we don't store it and Offset is 1. @@ -357,7 +357,7 @@ foobar{quantile="0.99"} 150.1` }, { m: `something{}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 18, Sum: 324789.4, PositiveSpans: []histogram.Span{{Offset: 0, Length: 2}}, @@ -369,7 +369,7 @@ foobar{quantile="0.99"} 150.1` }, { m: `something{a="b"}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 9, Sum: 42123.0, PositiveSpans: []histogram.Span{{Offset: 0, Length: 2}}, @@ -474,7 +474,7 @@ something_bucket{a="b",le="+Inf"} 9 # {id="something-test"} 2e100 123.000 }, { m: `something{}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 18, Sum: 324789.4, PositiveSpans: []histogram.Span{{Offset: 0, Length: 3}}, @@ -491,7 +491,7 @@ something_bucket{a="b",le="+Inf"} 9 # {id="something-test"} 2e100 123.000 }, { m: `something{a="b"}`, shs: &histogram.Histogram{ - Schema: -53, // Custom buckets. + Schema: histogram.CustomBucketsSchema, Count: 9, Sum: 42123.0, PositiveSpans: []histogram.Span{{Offset: 0, Length: 1}, {Offset: 1, Length: 1}},