Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Side by Side Diff: scripts/slave/telemetry_utils.py

Issue 545803002: Update buildbots to parse new telemetry JSON format. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« scripts/slave/runtest.py ('K') | « scripts/slave/telemetry.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #! /usr/bin/env python
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Log parsing for telemetry tests."""
7
8 import json
9 import logging
10
11
12 class TelemetryLogParser(object):
13
14 def __init__(self):
15 self._chart = None
16 self._ref_chart = None
17
18 def IsChartJson(self):
19 """This is the new telemetry --chartjson output format."""
20 return True
21
22 def Chart(self):
23 return self._chart
24
25 def RefChart(self):
26 return self._ref_chart
27
28 def ProcessLine(self, line):
sullivan 2014/09/05 04:30:00 Here is sample output from running the test: https
ghost stip (do not use) 2014/09/05 21:39:06 I was under the impression that telemetry would dr
sullivan 2014/09/05 21:47:03 Oops, I think I gave eakuefner some out-of-date ad
29 try:
30 results = json.loads(line.strip())
31 except ValueError:
32 return
33 if results.has_key('charts'):
34 if not self._chart:
35 self._chart = results
36 elif not self._ref_chart:
37 self._ref_chart = results
38 else:
39 logging.error('Too many result lines, dropping.')
40
41 def FailedTests(self):
42 # TODO(sullivan): Does this need to be implemented? Not in process_log_utils
43 return []
OLDNEW
« scripts/slave/runtest.py ('K') | « scripts/slave/telemetry.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698