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

Side by Side Diff: scripts/slave/performance_log_processor.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: Added unit tests and removed debugging code 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
« no previous file with comments | « no previous file | scripts/slave/results_dashboard.py » ('j') | scripts/slave/results_dashboard.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 self._channel = build_properties.get('channel', 'undefined') 105 self._channel = build_properties.get('channel', 'undefined')
106 self._webrtc_revision = build_properties.get('got_webrtc_revision', 106 self._webrtc_revision = build_properties.get('got_webrtc_revision',
107 'undefined') 107 'undefined')
108 108
109 self._v8_revision = 'undefined' 109 self._v8_revision = 'undefined'
110 if factory_properties.get('show_v8_revision'): 110 if factory_properties.get('show_v8_revision'):
111 self._v8_revision = build_properties.get('got_v8_revision', 'undefined') 111 self._v8_revision = build_properties.get('got_v8_revision', 'undefined')
112 112
113 self._percentiles = [.1, .25, .5, .75, .90, .95, .99] 113 self._percentiles = [.1, .25, .5, .75, .90, .95, .99]
114 114
115 def IsChartJson(self): # pylint: disable=R0201
116 """This is not the new telemetry --chartjson output format."""
117 return False
118
115 def PerformanceLogs(self): 119 def PerformanceLogs(self):
116 if not self._finalized: 120 if not self._finalized:
117 self._FinalizeProcessing() 121 self._FinalizeProcessing()
118 self._finalized = True 122 self._finalized = True
119 return self._output 123 return self._output
120 124
121 def PerformanceSummary(self): 125 def PerformanceSummary(self):
122 """Returns a list of strings about performance changes and other info.""" 126 """Returns a list of strings about performance changes and other info."""
123 if not self._finalized: 127 if not self._finalized:
124 self._FinalizeProcessing() 128 self._FinalizeProcessing()
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 if digits >= 100: 839 if digits >= 100:
836 # Don't append a meaningless '.0' to an integer number. 840 # Don't append a meaningless '.0' to an integer number.
837 digits = int(digits) 841 digits = int(digits)
838 # Exponent is now divisible by 3, between -3 and 6 inclusive: (-3, 0, 3, 6). 842 # Exponent is now divisible by 3, between -3 and 6 inclusive: (-3, 0, 3, 6).
839 return '%s%s' % (digits, metric_prefixes[exponent]) 843 return '%s%s' % (digits, metric_prefixes[exponent])
840 844
841 845
842 def _JoinWithSpacesAndNewLine(words): 846 def _JoinWithSpacesAndNewLine(words):
843 """Joins a list of words together with spaces.""" 847 """Joins a list of words together with spaces."""
844 return ' '.join(str(w) for w in words) + '\n' 848 return ' '.join(str(w) for w in words) + '\n'
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/results_dashboard.py » ('j') | scripts/slave/results_dashboard.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698