sync.Pool for rw
This commit is contained in:
+3
-1
@@ -568,11 +568,13 @@ func Test_newLogger(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
var preallocatedHello = []byte("Hello")
|
||||
|
||||
func Benchmark_GET(b *testing.B) {
|
||||
engine := New()
|
||||
|
||||
engine.GET("/hello", func(c *CTX) {
|
||||
c.W.Write([]byte("Hello"))
|
||||
c.W.Write(preallocatedHello)
|
||||
})
|
||||
|
||||
req := httptest.NewRequest(http.MethodGet, "/hello", nil)
|
||||
|
||||
Reference in New Issue
Block a user