* New code */
(b *testing.B)
| 143 | /* New code */ |
| 144 | |
| 145 | func newBenchmarkTasksQueue(b *testing.B) *TaskQueue { |
| 146 | metricStorage := metric.NewStorageMock(b) |
| 147 | metricStorage.HistogramObserveMock.Set(func(_ string, _ float64, _ map[string]string, _ []float64) { |
| 148 | // skip any observe hit |
| 149 | }) |
| 150 | metricStorage.GaugeSetMock.Set(func(_ string, _ float64, _ map[string]string) { |
| 151 | }) |
| 152 | metricStorage.CounterAddMock.Set(func(_ string, _ float64, _ map[string]string) { |
| 153 | }) |
| 154 | |
| 155 | return NewTasksQueue("test", metricStorage) |
| 156 | } |
| 157 | |
| 158 | func BenchmarkTaskQueue_AddLast_100(b *testing.B) { |
| 159 | benchmarkAddLast(b, newBenchmarkTasksQueue(b), 100) |
no test coverage detected