MCPcopy
hub / github.com/prometheus/client_golang / ServeHTTP

Method ServeHTTP

api/client_test.go:172–177  ·  view source on GitHub ↗
(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

170}
171
172func (t serveSpaces) ServeHTTP(w http.ResponseWriter, req *http.Request) {
173 kb := bytes.Repeat([]byte{' '}, 1024)
174 for i := 0; i < t.sizeKB; i++ {
175 w.Write(kb)
176 }
177}
178
179func BenchmarkClient(b *testing.B) {
180 b.ReportAllocs()

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected