From 5e8b550ad5170ebac69c5c0e095acf60a9eb2c66 Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Wed, 5 Jul 2023 10:36:39 +1000 Subject: [PATCH] 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 --- web/api/v1/api_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/web/api/v1/api_test.go b/web/api/v1/api_test.go index 2d7455bf20..dcd9d9a06c 100644 --- a/web/api/v1/api_test.go +++ b/web/api/v1/api_test.go @@ -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) }