Merge branch 'develop'

This commit is contained in:
siddontang 2014-10-24 22:30:36 +08:00
commit 1328e12108
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"github.com/siddontang/ledisdb/client/go/ledis" "github.com/siddontang/ledisdb/client/go/ledis"
"math/rand" "math/rand"
"runtime"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
@ -246,6 +247,8 @@ func benchZRevRangeByRank() {
} }
func main() { func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
flag.Parse() flag.Parse()
if *number <= 0 { if *number <= 0 {

View File

@ -33,7 +33,7 @@ func newClientRESP(conn net.Conn, app *App) {
c.client = newClient(app) c.client = newClient(app)
c.conn = conn c.conn = conn
c.rb = bufio.NewReaderSize(conn, 256) c.rb = bufio.NewReaderSize(conn, 4096)
c.resp = newWriterRESP(conn) c.resp = newWriterRESP(conn)
c.remoteAddr = conn.RemoteAddr().String() c.remoteAddr = conn.RemoteAddr().String()