| OLD | NEW |
| 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 Loading... |
| 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 | |
| 119 def PerformanceLogs(self): | 115 def PerformanceLogs(self): |
| 120 if not self._finalized: | 116 if not self._finalized: |
| 121 self._FinalizeProcessing() | 117 self._FinalizeProcessing() |
| 122 self._finalized = True | 118 self._finalized = True |
| 123 return self._output | 119 return self._output |
| 124 | 120 |
| 125 def PerformanceSummary(self): | 121 def PerformanceSummary(self): |
| 126 """Returns a list of strings about performance changes and other info.""" | 122 """Returns a list of strings about performance changes and other info.""" |
| 127 if not self._finalized: | 123 if not self._finalized: |
| 128 self._FinalizeProcessing() | 124 self._FinalizeProcessing() |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 if digits >= 100: | 835 if digits >= 100: |
| 840 # Don't append a meaningless '.0' to an integer number. | 836 # Don't append a meaningless '.0' to an integer number. |
| 841 digits = int(digits) | 837 digits = int(digits) |
| 842 # Exponent is now divisible by 3, between -3 and 6 inclusive: (-3, 0, 3, 6). | 838 # Exponent is now divisible by 3, between -3 and 6 inclusive: (-3, 0, 3, 6). |
| 843 return '%s%s' % (digits, metric_prefixes[exponent]) | 839 return '%s%s' % (digits, metric_prefixes[exponent]) |
| 844 | 840 |
| 845 | 841 |
| 846 def _JoinWithSpacesAndNewLine(words): | 842 def _JoinWithSpacesAndNewLine(words): |
| 847 """Joins a list of words together with spaces.""" | 843 """Joins a list of words together with spaces.""" |
| 848 return ' '.join(str(w) for w in words) + '\n' | 844 return ' '.join(str(w) for w in words) + '\n' |
| OLD | NEW |