MCPcopy
hub / github.com/prometheus/prometheus / BenchmarkXor2Read

Function BenchmarkXor2Read

tsdb/chunkenc/xor2_test.go:97–117  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

95}
96
97func BenchmarkXor2Read(b *testing.B) {
98 c := NewXOR2Chunk()
99 app, err := c.Appender()
100 require.NoError(b, err)
101 for i := int64(0); i < 120*1000; i += 1000 {
102 app.Append(0, i, float64(i)+float64(i)/10+float64(i)/100+float64(i)/1000)
103 }
104
105 b.ReportAllocs()
106
107 var it Iterator
108 for b.Loop() {
109 var ts int64
110 var v float64
111 it = c.Iterator(it)
112 for it.Next() != ValNone {
113 ts, v = it.At()
114 }
115 _, _ = ts, v
116 }
117}
118
119func requireXOR2Samples(t *testing.T, samples []triple) {
120 t.Helper()

Callers

nothing calls this directly

Calls 6

AppenderMethod · 0.95
IteratorMethod · 0.95
NextMethod · 0.95
AtMethod · 0.95
NewXOR2ChunkFunction · 0.85
AppendMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…