Merge pull request #13986 from prometheus/main

promtool: Fix panic on extended tsdb analyze (#13976)
This commit is contained in:
Arthur Silva Sens 2024-04-24 09:37:09 -03:00 committed by GitHub
commit 29505211af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -838,6 +838,10 @@ func backfillOpenMetrics(path, outputDir string, humanReadable, quiet bool, maxB
}
func displayHistogram(dataType string, datas []int, total int) {
if len(datas) == 0 {
fmt.Printf("%s: N/A\n\n", dataType)
return
}
slices.Sort(datas)
start, end, step := generateBucket(datas[0], datas[len(datas)-1])
sum := 0