aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_performance_tests.py
diff options
context:
space:
mode:
authorGravatar Alex Polcyn <apolcyn@google.com>2016-10-19 09:27:57 -0700
committerGravatar Alex Polcyn <apolcyn@google.com>2016-10-19 09:27:57 -0700
commitcac93f673e80a4568790b6e478fbe7dd95962f34 (patch)
tree07e89fef8d6bea4fa9cd28a83bc700428aa8d17a /tools/run_tests/run_performance_tests.py
parent497966787a5955f03a4d7b2c0ee8d1948d7bd8e9 (diff)
clean up error counting and reporting
Diffstat (limited to 'tools/run_tests/run_performance_tests.py')
-rwxr-xr-xtools/run_tests/run_performance_tests.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py
index 5391ee6c92..732e267561 100755
--- a/tools/run_tests/run_performance_tests.py
+++ b/tools/run_tests/run_performance_tests.py
@@ -353,6 +353,7 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
return scenarios
+
def finish_qps_workers(jobs):
"""Waits for given jobs to finish and eventually kills them."""
retries = 0
@@ -451,7 +452,8 @@ scenarios = create_scenarios(languages,
if not scenarios:
raise Exception('No scenarios to run')
-num_failures = 0
+total_scenario_failures = 0
+total_jobs_killed = 0
for scenario in scenarios:
if args.dry_run:
print(scenario.name)
@@ -459,13 +461,14 @@ for scenario in scenarios:
try:
for worker in scenario.workers:
worker.start()
- jobset_failures, _ = jobset.run([scenario.jobspec,
+ scenario_failures, _ = jobset.run([scenario.jobspec,
create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)],
newline_on_success=True, maxjobs=1)
- num_failures += jobset_failures
+ total_scenario_failures += scenario_failures
finally:
# Consider jobs that need to be killed as failures
- num_failures += finish_qps_workers(scenario.workers)
+ total_jobs_killed += finish_qps_workers(scenario.workers)
if num_failures > 0:
- raise Exception('Failures occured')
+ print(str(total_scenario_failures) + " scenarios failed and " + str(total_jobs_killed) + " jobs killed")
+ sys.exit(1)