diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2018-12-21 13:07:00 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-29 18:18:11 -0800 |
commit | ad8b237f62b9464dbff9a163647ebe6b721d6b35 (patch) | |
tree | 90ff282bc85f7fe4650179ca80c0a6179e7f3a29 /cros_utils/tabulator.py | |
parent | f7f2b877ad1334f6a45be9e89578d07ea879c04c (diff) | |
download | toolchain-utils-ad8b237f62b9464dbff9a163647ebe6b721d6b35.tar.gz |
crosperf: Fix bugs and nit in report generation
Fixed two parts in source code to make unit test pass:
1) Without unit, cpu cycles still should multiply by weight
2) Do not try to access cwp_dso from experiment in BenchmarkResult object,
because there is method to generate report without running
experiment.
One nit to change the name of TableGenerator used for CPU cycle report.
TEST=passed all unit tests in crosperf
BUG=chromium:902785
CQ-DEPEND=CL:1376571
Change-Id: I8308b0287d60e77542ac60f5ecd5734907e51e01
Reviewed-on: https://chromium-review.googlesource.com/1389035
Commit-Ready: Zhizhou Yang <zhizhouy@google.com>
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'cros_utils/tabulator.py')
-rw-r--r-- | cros_utils/tabulator.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cros_utils/tabulator.py b/cros_utils/tabulator.py index 687ffeb8..cbc261b0 100644 --- a/cros_utils/tabulator.py +++ b/cros_utils/tabulator.py @@ -207,7 +207,7 @@ class TableGenerator(object): return table -class CPUTableGenerator(TableGenerator): +class CPUCyclesTableGenerator(TableGenerator): """Creates a table with only cpu cycles from the results The main public function is called GetTable(). @@ -231,7 +231,7 @@ class CPUTableGenerator(TableGenerator): 3) updated benchmark_results iter_count with composite benchmark The dict of list of list of dicts is passed into the constructor of - CPUTableGenerator. + CPUCyclesTableGenerator. This method converts that into a canonical list of lists which represents a table of values. @@ -291,7 +291,7 @@ class CPUTableGenerator(TableGenerator): val = run['cpu_cycles'][0] * self._weights[k] unit = run['cpu_cycles'][1] else: - val = run['cpu_cycles'] + val = run['cpu_cycles'] * self._weights[k] v.append(val) run_pass += 1 else: @@ -386,7 +386,7 @@ class CPUTableGenerator(TableGenerator): self._runs[k] = v self._iter_counts[k] = iterations - + return (table, self._runs, self._iter_counts) |