MCPcopy Index your code
hub / github.com/prometheus/prometheus / CustomBucketsHistogramSamples

Method CustomBucketsHistogramSamples

tsdb/record/record.go:1153–1158  ·  view source on GitHub ↗

CustomBucketsHistogramSamples appends the encoded custom-bucket histogram samples to b and returns the resulting slice.

(histograms []RefHistogramSample, b []byte)

Source from the content-addressed store, hash-verified

1151// CustomBucketsHistogramSamples appends the encoded custom-bucket histogram
1152// samples to b and returns the resulting slice.
1153func (e *Encoder) CustomBucketsHistogramSamples(histograms []RefHistogramSample, b []byte) []byte {
1154 if e.EnableSTStorage {
1155 return e.histogramSamplesV2(histograms, b)
1156 }
1157 return e.customBucketsHistogramSamplesV1(histograms, b)
1158}
1159
1160func (*Encoder) customBucketsHistogramSamplesV1(histograms []RefHistogramSample, b []byte) []byte {
1161 buf := encoding.Encbuf{B: b}

Callers 13

logMethod · 0.95
TestRecord_EncodeDecodeFunction · 0.95
TestRecord_CorruptedFunction · 0.95
TestRecord_TypeFunction · 0.95
TestCheckpointFunction · 0.95
logMethod · 0.95
collectOOORecordsMethod · 0.80
TestWatcher_TailFunction · 0.80

Calls 2

histogramSamplesV2Method · 0.95

Tested by 9

TestRecord_EncodeDecodeFunction · 0.76
TestRecord_CorruptedFunction · 0.76
TestRecord_TypeFunction · 0.76
TestCheckpointFunction · 0.76
TestWatcher_TailFunction · 0.64