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

Side by Side Diff: scripts/slave/process_log_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: Switched to having telemetry output json to files. 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
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """This module contains PerformanceLogProcessor and subclasses. 5 """This module contains PerformanceLogProcessor and subclasses.
6 6
7 Several performance tests have complicated log output, this module is intended 7 Several performance tests have complicated log output, this module is intended
8 to help buildsteps parse these logs and identify if tests had anomalies. 8 to help buildsteps parse these logs and identify if tests had anomalies.
9 9
10 The classes in this file all have the same method ProcessLine, just like 10 The classes in this file all have the same method ProcessLine, just like
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 self._channel = build_properties.get('channel', 'undefined') 159 self._channel = build_properties.get('channel', 'undefined')
160 self._webrtc_revision = build_properties.get('got_webrtc_revision', 160 self._webrtc_revision = build_properties.get('got_webrtc_revision',
161 'undefined') 161 'undefined')
162 162
163 self._v8_revision = 'undefined' 163 self._v8_revision = 'undefined'
164 if factory_properties.get('show_v8_revision'): 164 if factory_properties.get('show_v8_revision'):
165 self._v8_revision = build_properties.get('got_v8_revision', 'undefined') 165 self._v8_revision = build_properties.get('got_v8_revision', 'undefined')
166 166
167 self._percentiles = [.1, .25, .5, .75, .90, .95, .99] 167 self._percentiles = [.1, .25, .5, .75, .90, .95, .99]
168 168
169 def IsChartJson(self):
170 """This is not the new telemetry --chartjson output format."""
171 return False
172
169 def PerformanceLogs(self): 173 def PerformanceLogs(self):
170 if not self._finalized: 174 if not self._finalized:
171 self._FinalizeProcessing() 175 self._FinalizeProcessing()
172 self._finalized = True 176 self._finalized = True
173 return self._output 177 return self._output
174 178
175 def PerformanceSummary(self): 179 def PerformanceSummary(self):
176 """Returns a list of strings about performance changes and other info.""" 180 """Returns a list of strings about performance changes and other info."""
177 if not self._finalized: 181 if not self._finalized:
178 self._FinalizeProcessing() 182 self._FinalizeProcessing()
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 for page in self._page_list: 837 for page in self._page_list:
834 times = page_times[page] 838 times = page_times[page]
835 mean, stddev = chromium_utils.FilteredMeanAndStandardDeviation(times) 839 mean, stddev = chromium_utils.FilteredMeanAndStandardDeviation(times)
836 file_data.append('%s (%s+/-%s): %s' % (page, 840 file_data.append('%s (%s+/-%s): %s' % (page,
837 _FormatFloat(mean), 841 _FormatFloat(mean),
838 _FormatFloat(stddev), 842 _FormatFloat(stddev),
839 _JoinWithSpacesAndNewLine(times))) 843 _JoinWithSpacesAndNewLine(times)))
840 844
841 filename = '%s_%s.dat' % (self._revision, trace_name) 845 filename = '%s_%s.dat' % (self._revision, trace_name)
842 return {filename: file_data} 846 return {filename: file_data}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698