forked from mirror/redis
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…
Reference in New Issue