Add missing InstallCodec call to benchmark

@bboreham noticed that `BenchmarkRespond` was missing a call to `InstallCodec` in 
https://github.com/prometheus/prometheus/pull/11905#discussion_r1251255249
This commit is contained in:
Charles Korn 2023-07-05 10:36:39 +10:00 committed by GitHub
parent 31164a7373
commit 5e8b550ad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3293,6 +3293,7 @@ func BenchmarkRespond(b *testing.B) {
}
b.ResetTimer()
api := API{}
api.InstallCodec(JSONCodec{})
for n := 0; n < b.N; n++ {
api.respond(&testResponseWriter, request, response, nil)
}