MCPcopy
hub / github.com/OJ/gobuster / BenchmarkNewHTTPClient

Function BenchmarkNewHTTPClient

libgobuster/http_test.go:132–147  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

130}
131
132func BenchmarkNewHTTPClient(b *testing.B) {
133 r, err := randomString(500)
134 if err != nil {
135 b.Fatal(err)
136 }
137 h := httpServerB(b, r)
138 defer h.Close()
139 var o HTTPOptions
140 log := NewLogger(false)
141 for b.Loop() {
142 _, err := NewHTTPClient(&o, log)
143 if err != nil {
144 b.Fatalf("Got Error: %v", err)
145 }
146 }
147}

Callers

nothing calls this directly

Calls 6

randomStringFunction · 0.85
httpServerBFunction · 0.85
NewLoggerFunction · 0.85
NewHTTPClientFunction · 0.85
FatalMethod · 0.80
FatalfMethod · 0.80

Tested by

no test coverage detected