Added router benchmarks

This commit is contained in:
Eduard Urbach 2024-03-12 20:35:19 +01:00
parent ea969d3aa2
commit b1e678bce7
Signed by: eduard
GPG key ID: 49226B848C78F6C8
10 changed files with 129 additions and 11 deletions

11
NullResponse_test.go Normal file
View file

@ -0,0 +1,11 @@
package server_test
import "net/http"
// NullResponse implements the http.ResponseWriter interface with
// empty methods to better understand memory usage in benchmarks.
type NullResponse struct{}
func (r *NullResponse) Header() http.Header { return nil }
func (r *NullResponse) Write([]byte) (int, error) { return 0, nil }
func (r *NullResponse) WriteHeader(int) {}