summaryrefslogtreecommitdiffstats
path: root/storperf/main.py
diff options
context:
space:
mode:
authormbeierl <mark.beierl@emc.com>2015-12-11 15:31:17 -0500
committermbeierl <mark.beierl@emc.com>2015-12-11 15:31:17 -0500
commitf099c8aaa7aeae805f7534382bfef789894abffb (patch)
treef0f1faf3def935d9a6fe6f0f2a1e26ddb3815dd2 /storperf/main.py
parent5108c90fa276adb761d294c963d0903395950864 (diff)
Workload reporting
Use a local db to track start/end times of runs so we can go back to the carbon db and summarize values at reporting time based off the raw data. Change-Id: Ie62afd339fd1c15d82bc56c93c7cba5bd4f90fe2 JIRA: STORPERF-29 Signed-off-by: mbeierl <mark.beierl@emc.com>
Diffstat (limited to 'storperf/main.py')
-rw-r--r--storperf/main.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/storperf/main.py b/storperf/main.py
index 2423b99..11357f4 100644
--- a/storperf/main.py
+++ b/storperf/main.py
@@ -52,18 +52,22 @@ def main(argv=None):
setup_logging()
test_executor = TestExecutor()
verbose = False
+ debug = False
workloads = None
+ report = None
if argv is None:
argv = sys.argv
try:
try:
- opts, args = getopt.getopt(argv[1:], "t:w:scvh",
+ opts, args = getopt.getopt(argv[1:], "t:w:r:scvdh",
["target=",
"workload=",
+ "report=",
"nossd",
"nowarm",
"verbose",
+ "debug",
"help",
])
except getopt.error, msg:
@@ -75,14 +79,23 @@ def main(argv=None):
return 0
elif o in ("-t", "--target"):
test_executor.filename = a
+ elif o in ("-t", "--target"):
+ report = a
elif o in ("-v", "--verbose"):
verbose = True
+ elif o in ("-d", "--debug"):
+ debug = True
elif o in ("-s", "--nossd"):
test_executor.precondition = False
elif o in ("-c", "--nowarm"):
test_executor.warm = False
elif o in ("-w", "--workload"):
workloads = a.split(",")
+ elif o in ("-r", "--report"):
+ report = a
+
+ if (debug):
+ logging.getLogger().setLevel(logging.DEBUG)
test_executor.register_workloads(workloads)
@@ -98,7 +111,10 @@ def main(argv=None):
if (verbose):
test_executor.register(event)
- test_executor.execute()
+ if (report is not None):
+ print test_executor.fetch_results(report, workloads)
+ else:
+ test_executor.execute()
if __name__ == "__main__":
sys.exit(main())