Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 3db81aa

Browse files
authored
Rename automation perf test launcher (#37)
Add Python shebang Improve usage
1 parent 9e94955 commit 3db81aa

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python3
2+
13
""" This script is responsible using vegeta to make a list of performance tests (configured via command line) and saves its result on csv file
24
"""
35

@@ -55,8 +57,16 @@ def __init__(self, argv):
5557
self.repetitions = int(argv[5])
5658
self.test_sequence = argv[6]
5759
else:
58-
print("usage: "+argv[0]+ " <vegetaPatternTarFile> [daemonOnCore - or 0-1 or 0-2 ...]")
59-
print(" [turboGethAddress i.e localhost:porta or 1.1.1.1:porta] [gethHomeDir i.e ../../../turbo-geth/] [test repetitions i.e 10] [test seq i.e 200:30,400:10]")
60+
print("Usage: " + argv[0] + " vegetaPatternTarFile [daemonOnCore] [turboGethAddress] [turboGethHomeDir] [testRepetitions] [testSequence]")
61+
print("")
62+
print("Launch an automated performance test sequence on Silkrpc and RPCDaemon using Vegeta")
63+
print("")
64+
print("vegetaPatternTarFile path to the request file for Vegeta attack")
65+
print("daemonOnCore logical cpu list in taskset format (e.g. - or 0-1 or 0-2 or 0,2...) [default: " + DEFAULT_DAEMON_ON_CORE +"]")
66+
print("turboGethAddress address of TG Core component as <address>:<port> (e.g. localhost:9090) [default: " + DEFAULT_TG_ADDRESS + "]")
67+
print("turboGethHomeDir path to TG home folder (e.g. ../../../turbo-geth/) [default: " + DEFAULT_GETH_HOME_DIR + "]")
68+
print("testRepetitions number of repetitions for each element in test sequence (e.g. 10) [default: " + str(DEFAULT_REPETITIONS) + "]")
69+
print("testSequence list of query-per-sec and duration tests as <qps1>:<t1>,... (e.g. 200:30,400:10) [default: " + DEFAULT_TEST_SEQUENCE + "]")
6070
sys.exit(-1)
6171

6272

@@ -221,9 +231,6 @@ def close(self):
221231
#
222232
# main
223233
#
224-
# usage: ptrhon perf.py <vegetaPatternTarFile> [daemonOnCore - or 0-1 or 0-2 ...]
225-
# [turboGethAddress i.e localhost:porta or 1.1.1.1:porta] [gethHomeDir i.e ../../../turbo-geth/] [test repetitions i.e 10] [test seq i.e 200:30,400:10]
226-
#
227234
def main(argv):
228235
""" Executes tests on selected user configuration
229236
"""
@@ -269,7 +276,7 @@ def main(argv):
269276

270277

271278
#
272-
# main
279+
# module as main
273280
#
274281
if __name__ == "__main__":
275282
main(sys.argv)

0 commit comments

Comments
 (0)