Skip to content

Commit fb6a10e

Browse files
committed
[add] Include brief tool description and sample usages...
1 parent 08e1afe commit fb6a10e

File tree

2 files changed

+82
-1
lines changed

2 files changed

+82
-1
lines changed

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# redisgraph-benchmark-go
2+
3+
## Overview
4+
5+
This repo contains code to quick benchmark RedisGraph, using the official redisgraph-go client.
6+
7+
## Installation
8+
9+
The easiest way to get and install the redisgraph-benchmark-go Go program is to use
10+
`go get` and then `go install`:
11+
```bash
12+
# Fetch this repo
13+
go get github.com/filipecosta90/redisgraph-benchmark-go
14+
cd $GOPATH/src/github.com/filipecosta90/redisgraph-benchmark-go
15+
make
16+
```
17+
18+
## Usage of redisgraph-benchmark-go
19+
20+
```
21+
$ ./redisgraph-benchmark-go --help
22+
Usage of ./redisgraph-benchmark-go:
23+
-a string
24+
Password for Redis Auth.
25+
-c uint
26+
number of clients. (default 50)
27+
-debug int
28+
Client debug level.
29+
-graph-key string
30+
graph key. (default "graph")
31+
-h string
32+
Server hostname. (default "127.0.0.1")
33+
-l Loop. Run the tests forever.
34+
-n uint
35+
Total number of requests (default 1000000)
36+
-p int
37+
Server port. (default 6379)
38+
-rps int
39+
Max rps. If 0 no limit is applied and the DB is stressed up to maximum.
40+
```
41+
42+
## Sample output - 10M commands
43+
44+
```
45+
$ redisgraph-benchmark-go -graph-key graph "CREATE (u:User)"
46+
Total clients: 50. Commands per client: 20000 Total commands: 1000000
47+
Test time Total Commands Total Errors Command Rate Client p50 with RTT(ms) Graph Internal p50 with RTT(ms)
48+
43s [100.0%] 1000000 0 [0.0%] 14810.59 2.087 0.000
49+
#################################################
50+
Total Duration 43.000 Seconds
51+
Total Errors 0
52+
Throughput summary: 23256 requests per second
53+
Overall Client Latency summary (msec):
54+
p50 p95 p99
55+
2.087 2.977 3.611
56+
Overall RedisGraph Internal Execution time Latency summary (msec):
57+
p50 p95 p99
58+
0.000 0.000 0.000
59+
```
60+
61+
62+
## Sample output - running in loop mode ( Ctrl+c to stop )
63+
64+
```
65+
$ redisgraph-benchmark-go -l -graph-key graph "CREATE (u:User)"
66+
Running in loop until you hit Ctrl+C
67+
Test time Total Commands Total Errors Command Rate Client p50 with RTT(ms) Graph Internal p50 with RTT(ms)
68+
^C 9s [----%] 263185 0 [0.0%] 24167.81 1.846 0.000
69+
received Ctrl-c - shutting down
70+
71+
#################################################
72+
Total Duration 9.000 Seconds
73+
Total Errors 0
74+
Throughput summary: 29243 requests per second
75+
Overall Client Latency summary (msec):
76+
p50 p95 p99
77+
1.846 2.383 3.117
78+
Overall RedisGraph Internal Execution time Latency summary (msec):
79+
p50 p95 p99
80+
0.000 0.000 0.000
81+
```

redisgraph-bechmark-go.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func main() {
6969
rps := flag.Int64("rps", 0, "Max rps. If 0 no limit is applied and the DB is stressed up to maximum.")
7070
password := flag.String("a", "", "Password for Redis Auth.")
7171
clients := flag.Uint64("c", 50, "number of clients.")
72-
numberRequests := flag.Uint64("n", 100000, "Total number of requests")
72+
numberRequests := flag.Uint64("n", 1000000, "Total number of requests")
7373
debug := flag.Int("debug", 0, "Client debug level.")
7474
loop := flag.Bool("l", false, "Loop. Run the tests forever.")
7575
graphKey := flag.String("graph-key", "graph", "graph key.")

0 commit comments

Comments
 (0)