MCPcopy
hub / github.com/grafana/tempo / BenchmarkCacheKeyForJob

Function BenchmarkCacheKeyForJob

modules/frontend/cache_keys_test.go:150–170  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

148}
149
150func BenchmarkCacheKeyForJob(b *testing.B) {
151 req := &tempopb.SearchRequest{
152 Start: 10,
153 End: 20,
154 }
155 meta := &backend.BlockMeta{
156 BlockID: backend.MustParse("00000000-0000-0000-0000-000000000123"),
157 StartTime: time.Unix(15, 0),
158 EndTime: time.Unix(16, 0),
159 }
160
161 startTime := time.Unix(int64(req.Start), 0)
162 endTime := time.Unix(int64(req.End), 0)
163
164 for i := 0; i < b.N; i++ {
165 s := searchJobCacheKey("foo", 10, startTime, endTime, meta, 1, 2)
166 if len(s) == 0 {
167 b.Fatalf("expected non-empty string")
168 }
169 }
170}

Callers

nothing calls this directly

Calls 2

MustParseFunction · 0.92
searchJobCacheKeyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…