Updated README
This commit is contained in:
parent
e39129618b
commit
0236cca1d2
25
README.md
25
README.md
@ -1,10 +1,31 @@
|
|||||||
#Redis Load Test
|
# Redis Load Test
|
||||||
A simple program to perform load testing against a redis instance
|
A simple program to perform load testing against a redis instance
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- go compiler
|
- go compiler (only tested on go1.17)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
`make build` for docker installation
|
||||||
|
|
||||||
|
for local installation:
|
||||||
|
```
|
||||||
|
make build-local
|
||||||
|
mv redisLoadTest /usr/local/bin/
|
||||||
|
```
|
||||||
## Commands
|
## Commands
|
||||||
|
```
|
||||||
|
-host=$REMOTE_HOST
|
||||||
|
-username=string --not implemented yet
|
||||||
|
-password=string --not implemented yet
|
||||||
|
-db=int --not implemented yet
|
||||||
|
-initialize=bool defaults to false, initializes database
|
||||||
|
-rate=int defautls to 50 at int / second
|
||||||
|
-burst=bool defaults to true performs burst test along with steady rate test
|
||||||
|
-dbEntries=int defaults to 50000 number of database entries to add
|
||||||
|
-duration=int defaults to 10 for each test duration in seconds
|
||||||
|
```
|
||||||
|
|
||||||
|
## sample usage
|
||||||
|
```
|
||||||
|
redisLoadTest -host=MyCoolServer -initialize=true -rate=60 -duration=60
|
||||||
|
```
|
@ -51,7 +51,9 @@ func getRateTest(rdbPtr *redis.Conn, rate int, keyMaxValue int, duration time.Du
|
|||||||
rateLimiter := time.Tick(time.Millisecond * time.Duration(x))
|
rateLimiter := time.Tick(time.Millisecond * time.Duration(x))
|
||||||
|
|
||||||
fmt.Println("Starting Test at", rateLimiter, "milliseconds per request...")
|
fmt.Println("Starting Test at", rateLimiter, "milliseconds per request...")
|
||||||
|
// select {
|
||||||
|
// case <- time.After(10 * time.Second):
|
||||||
|
// fmt.Fprintf(w, "hello\n")
|
||||||
go func() {
|
go func() {
|
||||||
for i := 0; i < int(duration.Seconds()); i++ {
|
for i := 0; i < int(duration.Seconds()); i++ {
|
||||||
fmt.Println(i, int(duration.Seconds()))
|
fmt.Println(i, int(duration.Seconds()))
|
||||||
|
Loading…
Reference in New Issue
Block a user