aboutsummaryrefslogtreecommitdiff
path: root/crosperf
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@chromium.org>2013-08-15 10:25:36 -0700
committerChromeBot <chrome-bot@google.com>2013-08-15 13:23:40 -0700
commit4f10d39a499ad872c22402aa763037fc3351f399 (patch)
tree4ba8fed6b3a87738c12698ebe25cda8c7bc50904 /crosperf
parentc01232264caccaffe6302414b7e901a96d3b18bf (diff)
downloadtoolchain-utils-4f10d39a499ad872c22402aa763037fc3351f399.tar.gz
Fix results processing to handle "JSON.stringify" in Telemetry results.
This is the same as the previous CL; I had to abandon the previous CL because it erroneously depended on a different abandoned CL, so it refused to commit. BUG=none TEST=I ran the telemetry tests with the modification and now ALL of them give good output (before only about half of them did). Change-Id: I567f51176c522bc1c41676f6dc560f3827b9cef4 Reviewed-on: https://gerrit-int.chromium.org/42930 Reviewed-by: Bhaskar Janakiraman <bjanakiraman@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf')
-rw-r--r--crosperf/results_cache.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py
index e1bcdce8..d40c8f31 100644
--- a/crosperf/results_cache.py
+++ b/crosperf/results_cache.py
@@ -294,10 +294,18 @@ class TelemetryResult(Result):
# We need to convert to this format:
# {"www.google.com:average_commit_time (ms)": "33.4",
# "www.google.com:...": "21.2"}
+ # Added note: Occasionally the output comes back
+ # with "JSON.stringify(window.automation.GetResults())" on
+ # the first line, and then the rest of the output as
+ # described above.
lines = self.out.splitlines()
self.keyvals = {}
+ if lines:
+ if lines[0].startswith("JSON.stringify"):
+ lines = lines[1:]
+
if not lines:
return
labels = lines[0].split(",")