(b *testing.B)
| 188 | } |
| 189 | |
| 190 | func BenchmarkSummaryNoLabels(b *testing.B) { |
| 191 | m := NewSummary(SummaryOpts{ |
| 192 | Name: "benchmark_summary", |
| 193 | Help: "A summary to benchmark it.", |
| 194 | Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}, |
| 195 | }, |
| 196 | ) |
| 197 | b.ReportAllocs() |
| 198 | b.ResetTimer() |
| 199 | for i := 0; i < b.N; i++ { |
| 200 | m.Observe(3.1415) |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | func BenchmarkHistogramWithLabelValues(b *testing.B) { |
| 205 | m := NewHistogramVec( |
nothing calls this directly
no test coverage detected