mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #511 from grafana/charleskorn/fix-benchmark
Add missing `InstallCodec` call to benchmark
This commit is contained in:
commit
6f75f8768f
|
@ -3293,6 +3293,7 @@ func BenchmarkRespond(b *testing.B) {
|
||||||
}
|
}
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
api := API{}
|
api := API{}
|
||||||
|
api.InstallCodec(JSONCodec{})
|
||||||
for n := 0; n < b.N; n++ {
|
for n := 0; n < b.N; n++ {
|
||||||
api.respond(&testResponseWriter, request, response, nil)
|
api.respond(&testResponseWriter, request, response, nil)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue