1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00
This commit is contained in:
Vladimir Mihailenco
2018-08-06 13:59:15 +03:00
parent 464daeb271
commit 96d1b85009
8 changed files with 61 additions and 39 deletions

View File

@ -1,7 +1,6 @@
package proto_test
import (
"strings"
"testing"
"time"
@ -15,7 +14,7 @@ var _ = Describe("WriteBuffer", func() {
var buf *proto.WriteBuffer
BeforeEach(func() {
buf = proto.NewWriteBuffer(proto.NewElasticBufReader(strings.NewReader("")))
buf = proto.NewWriteBuffer()
})
It("should reset", func() {
@ -54,7 +53,7 @@ var _ = Describe("WriteBuffer", func() {
})
func BenchmarkWriteBuffer_Append(b *testing.B) {
buf := proto.NewWriteBuffer(proto.NewElasticBufReader(strings.NewReader("")))
buf := proto.NewWriteBuffer()
args := []interface{}{"hello", "world", "foo", "bar"}
for i := 0; i < b.N; i++ {