(b *testing.B)
| 148 | } |
| 149 | |
| 150 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…