mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
fix analyze limit not work expected (#7430)
Signed-off-by: joelei <thezero12@hotmail.com>
This commit is contained in:
parent
70b0a34616
commit
74a73ba1cf
|
@ -493,10 +493,10 @@ func analyzeBlock(b tsdb.BlockReader, limit int) error {
|
|||
sort.Slice(postingInfos, func(i, j int) bool { return postingInfos[i].metric > postingInfos[j].metric })
|
||||
|
||||
for i, pc := range postingInfos {
|
||||
fmt.Printf("%d %s\n", pc.metric, pc.key)
|
||||
if i >= limit {
|
||||
break
|
||||
}
|
||||
fmt.Printf("%d %s\n", pc.metric, pc.key)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue