MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / BenchmarkHTTPClient_shouldRetry

Function BenchmarkHTTPClient_shouldRetry

pkg/api/http_test.go:602–611  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

600}
601
602func BenchmarkHTTPClient_shouldRetry(b *testing.B) {
603 client := NewHTTPClient(&http.Client{}, "https://test.example.com", testutils.NewTestLogger())
604 err := fmt.Errorf("connection refused")
605
606 b.ResetTimer()
607
608 for i := 0; i < b.N; i++ {
609 _ = client.shouldRetry(err, 1, 3)
610 }
611}

Callers

nothing calls this directly

Calls 3

shouldRetryMethod · 0.95
NewTestLoggerFunction · 0.92
NewHTTPClientFunction · 0.85

Tested by

no test coverage detected