1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Separate read and write buffers for PubSub.

This commit is contained in:
Vladimir Mihailenco
2017-02-19 09:42:45 +02:00
parent a40c8d17fe
commit 6b6f5ca133
5 changed files with 12 additions and 13 deletions

View File

@ -14,7 +14,7 @@ var _ = Describe("WriteBuffer", func() {
var buf *proto.WriteBuffer
BeforeEach(func() {
buf = proto.NewWriteBuffer(nil)
buf = proto.NewWriteBuffer()
})
It("should reset", func() {
@ -53,7 +53,7 @@ var _ = Describe("WriteBuffer", func() {
})
func BenchmarkWriteBuffer_Append(b *testing.B) {
buf := proto.NewWriteBuffer(nil)
buf := proto.NewWriteBuffer()
args := []interface{}{"hello", "world", "foo", "bar"}
for i := 0; i < b.N; i++ {