mirror of
https://github.com/redis/go-redis.git
synced 2025-04-16 09:23:06 +03:00
Bench bigget values
This commit is contained in:
parent
ef3e0e9827
commit
cfe305296f
@ -69,11 +69,13 @@ func BenchmarkRedisSetString(b *testing.B) {
|
||||
{10, 1024},
|
||||
{10, 64 * 1024},
|
||||
{10, 1024 * 1024},
|
||||
{10, 10 * 1024 * 1024},
|
||||
|
||||
{100, 64},
|
||||
{100, 1024},
|
||||
{100, 64 * 1024},
|
||||
{100, 1024 * 1024},
|
||||
{100, 10 * 1024 * 1024},
|
||||
}
|
||||
for _, bm := range benchmarks {
|
||||
b.Run(bm.String(), func(b *testing.B) {
|
||||
|
@ -81,10 +81,11 @@ func (cn *Conn) EnableConcurrentReadWrite() {
|
||||
}
|
||||
|
||||
func (cn *Conn) PrepareWriteBuffer() *proto.WriteBuffer {
|
||||
if !cn.concurrentReadWrite {
|
||||
if cn.concurrentReadWrite {
|
||||
cn.wb.Reset()
|
||||
} else {
|
||||
cn.wb.ResetBuffer(cn.Rd.Buffer())
|
||||
}
|
||||
cn.wb.Reset()
|
||||
return cn.wb
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user