aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_cache.py
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-08-16 10:39:04 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-17 14:41:15 -0700
commit882e707d7e4f63c8e64fa554e77303c4800258c7 (patch)
tree095d68bd3f873ddaf16209e171019546199b417e /crosperf/results_cache.py
parentbabb65232cbb7de2365d117f3593cdea8a263f05 (diff)
downloadtoolchain-utils-882e707d7e4f63c8e64fa554e77303c4800258c7.tar.gz
[crosperf] Fix telemetry results parsing.
Many telemetry results fields now contain multiple values. This CL fixes crosperf to accomodate that. BUG=None TEST=Ran crosperf with change and it worked. Change-Id: Iccb8926223c8447b72d51f413756f5dbc09f89de Reviewed-on: https://chrome-internal-review.googlesource.com/276817 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'crosperf/results_cache.py')
-rw-r--r--crosperf/results_cache.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py
index e9096563..9467cc86 100644
--- a/crosperf/results_cache.py
+++ b/crosperf/results_cache.py
@@ -319,9 +319,9 @@ class Result(object):
if 'value' in value_dict:
result = value_dict['value']
elif 'values' in value_dict:
- result = value_dict['values'][0]
- if len(value_dict['values']) > 1:
- raise RuntimeError('Too many values returned for %s.' % item)
+ if not value_dict['values']:
+ continue
+ result = value_dict['values']
units = value_dict['units']
new_value = [result, units]
keyvals[keyname] = new_value