Skip to content

Instantly share code, notes, and snippets.

@SkamDart SkamDart/stress.py
Last active Apr 24, 2017

Embed
What would you like to do?
241 stress test script slightly modified
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
You can’t perform that action at this time.