logzio / elasticsearch-stress-test

Stress test tool for Elasticsearch
Apache License 2.0
271 stars 110 forks source link

Fixing print statement and starting clients #8 #10

Closed aboutte closed 7 years ago

aboutte commented 7 years ago

I attempted to use this tool today but ran into a few issues.

First was the following exception:

/usr/bin/python3.4 elasticsearch-stress-test.py  --es_address internal-radar-loa-elastics-V0IPG0MET5WO-523946241.us-west-2.elb.amazonaws.com --indices 25 --documents 5 --seconds 300 --not-green --clients 5 --number-of-shards 2 --number-of-replicas 1 --no-cleanup --stats-frequency 10
  File "elasticsearch-stress-test.py", line 388
    print "Ctrl-c received! Sending kill to threads..."
                                                      ^
SyntaxError: Missing parentheses in call to 'print'

After I fixed that I hit this following exception:

/usr/bin/python3.4 elasticsearch-stress-test.py  --es_address internal-radar-loa-elastics-V0IPG0MET5WO-523946241.us-west-2.elb.amazonaws.com --indices 25 --documents 5 --seconds 300 --not-green --clients 5 --number-of-shards 2 --number-of-replicas 1 --no-cleanup --stats-frequency 10

Starting initialization of internal-radar-loa-elastics-V0IPG0MET5WO-523946241.us-west-2.elb.amazonaws.com
Done!
Creating indices..
Generating documents and workers..
Done!
Starting the test. Will print stats every 10 seconds.
The test would run for 300 seconds, but it might take a bit more because we are waiting for current bulk operation to complete.

Test is done! Final results:
Elapsed time: 4 seconds
Successful bulks: 0 (0 documents)
Failed bulks: 0 (0 documents)
Indexed approximately 0.0 MB which is 0.00 MB/s
roiravhon commented 7 years ago

LGTM, thanks @aboutte! This was written for python 2.7, there might be more compatibility issues hidden..