replace zxq.co/ripple/hanayo

This commit is contained in:
Alicia
2019-02-23 13:29:15 +00:00
commit c3d206c173
5871 changed files with 1353715 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package fasthttp
import (
"bytes"
"testing"
)
func BenchmarkByteBufferWrite(b *testing.B) {
s := []byte("foobarbaz")
b.RunParallel(func(pb *testing.PB) {
var buf ByteBuffer
for pb.Next() {
for i := 0; i < 100; i++ {
buf.Write(s)
}
buf.Reset()
}
})
}
func BenchmarkBytesBufferWrite(b *testing.B) {
s := []byte("foobarbaz")
b.RunParallel(func(pb *testing.PB) {
var buf bytes.Buffer
for pb.Next() {
for i := 0; i < 100; i++ {
buf.Write(s)
}
buf.Reset()
}
})
}