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()
|
ts, val := it.At()
|
||||||
fmt.Printf("%s %g %d\n", lbs, val, ts)
|
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 {
|
if it.Err() != nil {
|
||||||
return ss.Err()
|
return ss.Err()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue