aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_organizer.py
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2018-12-13 14:12:57 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-28 16:14:04 -0800
commitf7f2b877ad1334f6a45be9e89578d07ea879c04c (patch)
tree159649620aba78f42f01863c33886bf92cf75342 /crosperf/results_organizer.py
parent219e3b7cbbe1d62a7e23000180bbdb3f1acdc2e5 (diff)
downloadtoolchain-utils-f7f2b877ad1334f6a45be9e89578d07ea879c04c.tar.gz
crosperf: Generate report for cwp approximation
TODO: unit tests needed. This patch trys to generate a new type of report when cwp_dso is specified. The report will: 1) Generate a new summary table at benchmark level with weighted cpu cycle data. 2) Do not generate perf table. 3) Generate a full table with only cpu cycles in it. TEST=generated correct report with a normal run and two cwp_dso runs: one succeeded run and one with failures. BUG=chromium:902785 Change-Id: I0c62000c6690c66d50a7a4de3cfc280853b134e2 Reviewed-on: https://chromium-review.googlesource.com/1376571 Commit-Ready: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to 'crosperf/results_organizer.py')
-rw-r--r--crosperf/results_organizer.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/crosperf/results_organizer.py b/crosperf/results_organizer.py
index c39119bb..5410d6d8 100644
--- a/crosperf/results_organizer.py
+++ b/crosperf/results_organizer.py
@@ -188,9 +188,15 @@ def OrganizeResults(benchmark_runs, labels, benchmarks=None, json_report=False):
else:
# Did not find test_name in json file; show everything.
show_all_results = True
- for test_key in benchmark_run.result.keyvals:
- if show_all_results or test_key in summary_list:
- cur_dict[test_key] = benchmark_run.result.keyvals[test_key]
+ if benchmark_run.result.cwp_dso:
+ # If we are in cwp approximation mode, we only care about cpu_cycles
+ if 'cpu_cycles' in benchmark_run.result.keyvals:
+ cur_dict['cpu_cycles'] = benchmark_run.result.keyvals['cpu_cycles']
+ cur_dict['retval'] = benchmark_run.result.keyvals['retval']
+ else:
+ for test_key in benchmark_run.result.keyvals:
+ if show_all_results or test_key in summary_list:
+ cur_dict[test_key] = benchmark_run.result.keyvals[test_key]
# Occasionally Telemetry tests will not fail but they will not return a
# result, either. Look for those cases, and force them to be a fail.
# (This can happen if, for example, the test has been disabled.)