Merge pull request #511 from grafana/charleskorn/fix-benchmark

Add missing `InstallCodec` call to benchmark
This commit is contained in:
Charles Korn 2023-07-05 17:41:04 +10:00 committed by GitHub
commit 6f75f8768f
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)
}