mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 09:02:53 +00:00
promtool tsdb dump support native histogram (#12775)
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
This commit is contained in:
parent
db816ce9db
commit
eaaa21aa7f
@ -647,6 +647,14 @@ func dumpSamples(path string, mint, maxt int64, match string) (err error) {
|
||||
ts, val := it.At()
|
||||
fmt.Printf("%s %g %d\n", lbs, val, ts)
|
||||
}
|
||||
for it.Next() == chunkenc.ValFloatHistogram {
|
||||
ts, fh := it.AtFloatHistogram()
|
||||
fmt.Printf("%s %s %d\n", lbs, fh.String(), ts)
|
||||
}
|
||||
for it.Next() == chunkenc.ValHistogram {
|
||||
ts, h := it.AtHistogram()
|
||||
fmt.Printf("%s %s %d\n", lbs, h.String(), ts)
|
||||
}
|
||||
if it.Err() != nil {
|
||||
return ss.Err()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user