MCPcopy
hub / github.com/prometheus/prometheus / Samples

Method Samples

tsdb/record/record.go:929–934  ·  view source on GitHub ↗

Samples appends the encoded samples to b and returns the resulting slice. Depending on EnableSTStorage, it writes either a Samples or SamplesV2 record.

(samples []RefSample, b []byte)

Source from the content-addressed store, hash-verified

927// Depending on EnableSTStorage, it writes either a Samples or SamplesV2
928// record.
929func (e *Encoder) Samples(samples []RefSample, b []byte) []byte {
930 if e.EnableSTStorage {
931 return e.samplesV2(samples, b)
932 }
933 return e.samplesV1(samples, b)
934}
935
936// samplesV1 appends the encoded samples to b and returns the resulting slice.
937func (*Encoder) samplesV1(samples []RefSample, b []byte) []byte {

Calls 2

samplesV2Method · 0.95
samplesV1Method · 0.95