mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
More followup to #15164
Scrape test for NHCB modified. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
70742a64aa
commit
a23aed5634
|
@ -3758,17 +3758,11 @@ metric: <
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
checkBucketValues := func(expectedCount int, contentType string, series storage.SeriesSet) {
|
checkBucketValues := func(expectedCount int, series storage.SeriesSet) {
|
||||||
labelName := "le"
|
labelName := "le"
|
||||||
var expectedValues []string
|
var expectedValues []string
|
||||||
if expectedCount > 0 {
|
if expectedCount > 0 {
|
||||||
if contentType == "application/vnd.google.protobuf" {
|
expectedValues = []string{"0.005", "0.01", "0.025", "0.05", "0.1", "0.25", "0.5", "1.0", "2.5", "5.0", "10.0", "+Inf"}
|
||||||
// The expected "le" values have the trailing ".0".
|
|
||||||
expectedValues = []string{"0.005", "0.01", "0.025", "0.05", "0.1", "0.25", "0.5", "1.0", "2.5", "5.0", "10.0", "+Inf"}
|
|
||||||
} else {
|
|
||||||
// The expected "le" values do not have the trailing ".0".
|
|
||||||
expectedValues = []string{"0.005", "0.01", "0.025", "0.05", "0.1", "0.25", "0.5", "1", "2.5", "5", "10", "+Inf"}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
foundLeValues := map[string]bool{}
|
foundLeValues := map[string]bool{}
|
||||||
|
|
||||||
|
@ -3984,7 +3978,7 @@ metric: <
|
||||||
checkFloatSeries(series, expectedClassicHistCount, 10.)
|
checkFloatSeries(series, expectedClassicHistCount, 10.)
|
||||||
|
|
||||||
series = q.Select(ctx, false, nil, labels.MustNewMatcher(labels.MatchRegexp, "__name__", fmt.Sprintf("test_histogram_%d_bucket", i)))
|
series = q.Select(ctx, false, nil, labels.MustNewMatcher(labels.MatchRegexp, "__name__", fmt.Sprintf("test_histogram_%d_bucket", i)))
|
||||||
checkBucketValues(expectedClassicHistCount, metricsText.contentType, series)
|
checkBucketValues(expectedClassicHistCount, series)
|
||||||
|
|
||||||
series = q.Select(ctx, false, nil, labels.MustNewMatcher(labels.MatchRegexp, "__name__", fmt.Sprintf("test_histogram_%d", i)))
|
series = q.Select(ctx, false, nil, labels.MustNewMatcher(labels.MatchRegexp, "__name__", fmt.Sprintf("test_histogram_%d", i)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue