Merge pull request #8484 from jtattermusch/performance_tests_report

Make benchmarks create report.xml
pull/7556/head
Jan Tattermusch 8 years ago committed by GitHub
commit d28417c856
  1. 14
      tools/run_tests/run_performance_tests.py

@ -42,6 +42,7 @@ import os
import performance.scenario_config as scenario_config import performance.scenario_config as scenario_config
import pipes import pipes
import re import re
import report_utils
import subprocess import subprocess
import sys import sys
import tempfile import tempfile
@ -453,6 +454,7 @@ if not scenarios:
total_scenario_failures = 0 total_scenario_failures = 0
qps_workers_killed = 0 qps_workers_killed = 0
merged_resultset = {}
for scenario in scenarios: for scenario in scenarios:
if args.dry_run: if args.dry_run:
print(scenario.name) print(scenario.name)
@ -460,14 +462,20 @@ for scenario in scenarios:
try: try:
for worker in scenario.workers: for worker in scenario.workers:
worker.start() worker.start()
scenario_failures, _ = jobset.run([scenario.jobspec, scenario_failures, resultset = jobset.run([scenario.jobspec,
create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)], create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)],
newline_on_success=True, maxjobs=1) newline_on_success=True, maxjobs=1)
total_scenario_failures += scenario_failures total_scenario_failures += scenario_failures
merged_resultset = dict(itertools.chain(merged_resultset.iteritems(),
resultset.iteritems()))
finally: finally:
# Consider qps workers that need to be killed as failures # Consider qps workers that need to be killed as failures
qps_workers_killed += finish_qps_workers(scenario.workers) qps_workers_killed += finish_qps_workers(scenario.workers)
report_utils.render_junit_xml_report(merged_resultset, 'report.xml',
suite_name='benchmarks')
if total_scenario_failures > 0 or qps_workers_killed > 0: if total_scenario_failures > 0 or qps_workers_killed > 0:
print ("%s scenarios failed and %s qps worker jobs killed" % (total_scenario_failures, qps_workers_killed)) print ("%s scenarios failed and %s qps worker jobs killed" % (total_scenario_failures, qps_workers_killed))
sys.exit(1) sys.exit(1)

Loading…
Cancel
Save