mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
Follow up #15178
Renaming Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
482bb453c6
commit
70742a64aa
|
@ -3844,24 +3844,24 @@ metric: <
|
||||||
|
|
||||||
for metricsTextName, metricsText := range metricsTexts {
|
for metricsTextName, metricsText := range metricsTexts {
|
||||||
for name, tc := range map[string]struct {
|
for name, tc := range map[string]struct {
|
||||||
scrapeClassicHistograms bool
|
alwaysScrapeClassicHistograms bool
|
||||||
convertClassicHistograms bool
|
convertClassicHistograms bool
|
||||||
}{
|
}{
|
||||||
"convert with scrape": {
|
"convert with scrape": {
|
||||||
scrapeClassicHistograms: true,
|
alwaysScrapeClassicHistograms: true,
|
||||||
convertClassicHistograms: true,
|
convertClassicHistograms: true,
|
||||||
},
|
},
|
||||||
"convert without scrape": {
|
"convert without scrape": {
|
||||||
scrapeClassicHistograms: false,
|
alwaysScrapeClassicHistograms: false,
|
||||||
convertClassicHistograms: true,
|
convertClassicHistograms: true,
|
||||||
},
|
},
|
||||||
"scrape without convert": {
|
"scrape without convert": {
|
||||||
scrapeClassicHistograms: true,
|
alwaysScrapeClassicHistograms: true,
|
||||||
convertClassicHistograms: false,
|
convertClassicHistograms: false,
|
||||||
},
|
},
|
||||||
"neither scrape nor convert": {
|
"neither scrape nor convert": {
|
||||||
scrapeClassicHistograms: false,
|
alwaysScrapeClassicHistograms: false,
|
||||||
convertClassicHistograms: false,
|
convertClassicHistograms: false,
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
var expectedClassicHistCount, expectedNativeHistCount int
|
var expectedClassicHistCount, expectedNativeHistCount int
|
||||||
|
@ -3870,16 +3870,16 @@ metric: <
|
||||||
expectedNativeHistCount = 1
|
expectedNativeHistCount = 1
|
||||||
expectCustomBuckets = false
|
expectCustomBuckets = false
|
||||||
expectedClassicHistCount = 0
|
expectedClassicHistCount = 0
|
||||||
if metricsText.hasClassic && tc.scrapeClassicHistograms {
|
if metricsText.hasClassic && tc.alwaysScrapeClassicHistograms {
|
||||||
expectedClassicHistCount = 1
|
expectedClassicHistCount = 1
|
||||||
}
|
}
|
||||||
} else if metricsText.hasClassic {
|
} else if metricsText.hasClassic {
|
||||||
switch {
|
switch {
|
||||||
case tc.scrapeClassicHistograms && tc.convertClassicHistograms:
|
case tc.alwaysScrapeClassicHistograms && tc.convertClassicHistograms:
|
||||||
expectedClassicHistCount = 1
|
expectedClassicHistCount = 1
|
||||||
expectedNativeHistCount = 1
|
expectedNativeHistCount = 1
|
||||||
expectCustomBuckets = true
|
expectCustomBuckets = true
|
||||||
case !tc.scrapeClassicHistograms && tc.convertClassicHistograms:
|
case !tc.alwaysScrapeClassicHistograms && tc.convertClassicHistograms:
|
||||||
expectedClassicHistCount = 0
|
expectedClassicHistCount = 0
|
||||||
expectedNativeHistCount = 1
|
expectedNativeHistCount = 1
|
||||||
expectCustomBuckets = true
|
expectCustomBuckets = true
|
||||||
|
@ -3894,13 +3894,13 @@ metric: <
|
||||||
defer simpleStorage.Close()
|
defer simpleStorage.Close()
|
||||||
|
|
||||||
config := &config.ScrapeConfig{
|
config := &config.ScrapeConfig{
|
||||||
JobName: "test",
|
JobName: "test",
|
||||||
SampleLimit: 100,
|
SampleLimit: 100,
|
||||||
Scheme: "http",
|
Scheme: "http",
|
||||||
ScrapeInterval: model.Duration(100 * time.Millisecond),
|
ScrapeInterval: model.Duration(100 * time.Millisecond),
|
||||||
ScrapeTimeout: model.Duration(100 * time.Millisecond),
|
ScrapeTimeout: model.Duration(100 * time.Millisecond),
|
||||||
ScrapeClassicHistograms: tc.scrapeClassicHistograms,
|
AlwaysScrapeClassicHistograms: tc.alwaysScrapeClassicHistograms,
|
||||||
ConvertClassicHistograms: tc.convertClassicHistograms,
|
ConvertClassicHistograms: tc.convertClassicHistograms,
|
||||||
}
|
}
|
||||||
|
|
||||||
scrapeCount := 0
|
scrapeCount := 0
|
||||||
|
|
Loading…
Reference in a new issue