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
|
Redbench is a Go package that allows for bootstrapping benchmarks
|
||||||
for servers using a custom implementation of the Redis protocol. It provides
|
for servers using a custom implementation of the Redis protocol. It provides
|
||||||
the same inputs and outputs as the
|
the same inputs and outputs as the
|
||||||
[redis-benchmark](https://redis.io/topics/benchmarks) tool. The purpose of
|
[redis-benchmark](https://redis.io/topics/benchmarks) tool.
|
||||||
this library is to provide benchmarking for
|
|
||||||
|
The purpose of this library is to provide benchmarking for
|
||||||
[Redcon](https://github.com/tidwall/redcon) compatible servers such as
|
[Redcon](https://github.com/tidwall/redcon) compatible servers such as
|
||||||
[Tile38](https://github.com/tidwall/tile38), but also works well for Redis
|
[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
|
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
|
$ 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
|
### Custom Options
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
2
vendor/github.com/tidwall/redbench/bench.go
generated
vendored
2
vendor/github.com/tidwall/redbench/bench.go
generated
vendored
@ -30,9 +30,11 @@ func readResp(rd *bufio.Reader, n int) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if n >= 0 {
|
||||||
if _, err = io.CopyN(ioutil.Discard, rd, n+2); err != nil {
|
if _, err = io.CopyN(ioutil.Discard, rd, n+2); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case '*':
|
case '*':
|
||||||
n, err := strconv.ParseInt(string(line[1:len(line)-2]), 10, 64)
|
n, err := strconv.ParseInt(string(line[1:len(line)-2]), 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user