diff options
author | Tiancong Wang <tcwang@google.com> | 2019-08-30 11:34:05 -0700 |
---|---|---|
committer | Tiancong Wang <tcwang@google.com> | 2019-08-30 20:58:07 +0000 |
commit | d8bf28159ce917dfc60f9065c333762e957426f7 (patch) | |
tree | 04dbe6a9a3638e94079fd0c3ee2f19b85f5d8531 /crosperf/results_cache.py | |
parent | bd4d706e62197cca91a9ebc031eab86444c19635 (diff) | |
download | toolchain-utils-d8bf28159ce917dfc60f9065c333762e957426f7.tar.gz |
crosperf: Add support for using aquarium in Telemetry.
We want to test the story aquarium in rendering.desktop and see
the results comparison with graphics_WebGLAquarium in autotest.
This patch adds support to filter out the most important metric to
display in the report for the two aquarium stories (with different
number of fish). Also fix the logic of reading histogram results
when there's None value in the list.
Also add the test to toolchain nightly tests.
BUG=None
TEST=crosperf --board=nami with the two benchmarks
Change-Id: Ia1aa6bf796bee78bf6199332a07f4b96aa084845
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1779248
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Tiancong Wang <tcwang@google.com>
Tested-by: Tiancong Wang <tcwang@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Diffstat (limited to 'crosperf/results_cache.py')
-rw-r--r-- | crosperf/results_cache.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py index 80727f6f..4e7699da 100644 --- a/crosperf/results_cache.py +++ b/crosperf/results_cache.py @@ -5,6 +5,7 @@ """Module to deal with result cache.""" +from __future__ import division from __future__ import print_function import glob @@ -580,7 +581,12 @@ class Result(object): metric_name = obj['name'] vals = obj['sampleValues'] if isinstance(vals, list): - result = float(sum(vals)) / len(vals) + # Remove None elements from the list + vals = list(filter(None, vals)) + if len(vals): + result = float(sum(vals)) / len(vals) + else: + result = 0 else: result = vals unit = obj['unit'] |