update redbench
This commit is contained in:
parent
1780badf1b
commit
033f782a84
9
vendor/github.com/tidwall/redbench/README.md
generated
vendored
9
vendor/github.com/tidwall/redbench/README.md
generated
vendored
@ -4,8 +4,9 @@
|
||||
Redbench is a Go package that allows for bootstrapping benchmarks
|
||||
for servers using a custom implementation of the Redis protocol. It provides
|
||||
the same inputs and outputs as the
|
||||
[redis-benchmark](https://redis.io/topics/benchmarks) tool. The purpose of
|
||||
this library is to provide benchmarking for
|
||||
[redis-benchmark](https://redis.io/topics/benchmarks) tool.
|
||||
|
||||
The purpose of this library is to provide benchmarking for
|
||||
[Redcon](https://github.com/tidwall/redcon) compatible servers such as
|
||||
[Tile38](https://github.com/tidwall/tile38), but also works well for Redis
|
||||
operations that are not covered by the `redis-benchmark` tool such as the
|
||||
@ -65,12 +66,14 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
The operations is like as executing, but without the `GEO*` commands.
|
||||
Which is similar to executing:
|
||||
|
||||
```
|
||||
$ redis-benchmark -t PING,SET,GET
|
||||
```
|
||||
|
||||
For a more complete example, check out [tile38-benchmark](https://github.com/tidwall/tile38/blob/master/cmd/tile38-benchmark/main.go) from the [Tile38](https://github.com/tidwall/tile38) project.
|
||||
|
||||
### Custom Options
|
||||
|
||||
```go
|
||||
|
6
vendor/github.com/tidwall/redbench/bench.go
generated
vendored
6
vendor/github.com/tidwall/redbench/bench.go
generated
vendored
@ -30,8 +30,10 @@ func readResp(rd *bufio.Reader, n int) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = io.CopyN(ioutil.Discard, rd, n+2); err != nil {
|
||||
return err
|
||||
if n >= 0 {
|
||||
if _, err = io.CopyN(ioutil.Discard, rd, n+2); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
case '*':
|
||||
n, err := strconv.ParseInt(string(line[1:len(line)-2]), 10, 64)
|
||||
|
Loading…
x
Reference in New Issue
Block a user