Last active
April 24, 2017 15:25
-
-
Save SkamDart/e629d0e3b98458db2faa4742cdccd8c0 to your computer and use it in GitHub Desktop.
241 stress test script slightly modified
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
"""Usage: | |
python stress.py localhost:4000 PUT test format.h | |
alternatively, | |
chmod u+x | |
./stress.py localhost:4000 PUT test format.h | |
To copy locally, easily | |
wget -O stress.py https://gist.githubusercontent.com/SkamDart/e629d0e3b98458db2faa4742cdccd8c0/raw/528fe0571e684e345dbe135d1f383d989273c46f/stress.py | |
""" | |
clients = [] | |
serv_port = sys.argv[1] | |
command = sys.argv[2] | |
out = sys.argv[3] | |
in = sys.argv[4] | |
procs = int(sys.argv[5]) | |
for i in range(procs): | |
proc = subprocess.Popen(["./client-reference", serv_port, command, | |
out + str(i) + ".txt", in], | |
stdout=subprocess.PIPE) | |
clients.append(proc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment