mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08: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 a new issue