MCPcopy
hub / github.com/prometheus/prometheus / RolledbackSamples

Method RolledbackSamples

util/teststorage/appender.go:260–270  ·  view source on GitHub ↗

RolledbackSamples returns rolled back samples.

()

Source from the content-addressed store, hash-verified

258
259// RolledbackSamples returns rolled back samples.
260func (a *Appendable) RolledbackSamples() []Sample {
261 a.mtx.Lock()
262 defer a.mtx.Unlock()
263 if len(a.rolledbackSamples) == 0 {
264 return nil
265 }
266
267 ret := make([]Sample, len(a.rolledbackSamples))
268 copy(ret, a.rolledbackSamples)
269 return ret
270}
271
272func (a *Appendable) ResultReset() {
273 a.mtx.Lock()

Callers 6

TestFanoutAppenderFunction · 0.80
TestFanoutAppenderV2Function · 0.80
testAppendableV1Function · 0.80
testAppendableV2Function · 0.80

Implementers 15

Headtsdb/head.go
BlockWritertsdb/blockwriter.go
CircularExemplarStoragetsdb/exemplar.go
DBtsdb/db.go
XOR2Chunktsdb/chunkenc/xor2.go
HistogramChunktsdb/chunkenc/histogram.go
XORChunktsdb/chunkenc/xor.go
FloatHistogramChunktsdb/chunkenc/float_histogram.go
DBtsdb/agent/db.go
fanoutstorage/fanout.go
errStoragestorage/fanout_test.go
mockStoragestorage/fanout_test.go

Calls 1

LockMethod · 0.80

Tested by 6

TestFanoutAppenderFunction · 0.64
TestFanoutAppenderV2Function · 0.64
testAppendableV1Function · 0.64
testAppendableV2Function · 0.64