MCPcopy
hub / github.com/prometheus/prometheus / Tombstones

Method Tombstones

tsdb/record/record.go:1015–1027  ·  view source on GitHub ↗

Tombstones appends the encoded tombstones to b and returns the resulting slice.

(tstones []tombstones.Stone, b []byte)

Source from the content-addressed store, hash-verified

1013
1014// Tombstones appends the encoded tombstones to b and returns the resulting slice.
1015func (*Encoder) Tombstones(tstones []tombstones.Stone, b []byte) []byte {
1016 buf := encoding.Encbuf{B: b}
1017 buf.PutByte(byte(Tombstones))
1018
1019 for _, s := range tstones {
1020 for _, iv := range s.Intervals {
1021 buf.PutBE64(uint64(s.Ref))
1022 buf.PutVarint64(iv.Mint)
1023 buf.PutVarint64(iv.Maxt)
1024 }
1025 }
1026 return buf.Get()
1027}
1028
1029// Exemplars appends the encoded exemplars to b and returns the resulting
1030// slice.

Callers 9

truncateStaleSeriesMethod · 0.95
DeleteMethod · 0.95
populateTestWLFunction · 0.95
TestChunkSnapshotFunction · 0.95
TestRecord_EncodeDecodeFunction · 0.95
TestRecord_CorruptedFunction · 0.95
TestRecord_TypeFunction · 0.95

Calls 4

PutByteMethod · 0.95
PutBE64Method · 0.95
PutVarint64Method · 0.95
GetMethod · 0.95

Tested by 7

populateTestWLFunction · 0.76
TestChunkSnapshotFunction · 0.76
TestRecord_EncodeDecodeFunction · 0.76
TestRecord_CorruptedFunction · 0.76
TestRecord_TypeFunction · 0.76