| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 import json | 5 import json |
| 6 import logging | 6 import logging |
| 7 | 7 |
| 8 from metrics import Metric | 8 from metrics import Metric |
| 9 from telemetry.value import scalar | 9 from telemetry.value import scalar |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 logging.warning('No V8 object stats from website: ' + page.display_name) | 223 logging.warning('No V8 object stats from website: ' + page.display_name) |
| 224 | 224 |
| 225 def AddResults(self, tab, results): | 225 def AddResults(self, tab, results): |
| 226 """Add results for this page to the results object.""" | 226 """Add results for this page to the results object.""" |
| 227 assert self._results != None, 'Must call Stop() first' | 227 assert self._results != None, 'Must call Stop() first' |
| 228 for counter_name in self._results: | 228 for counter_name in self._results: |
| 229 description = DESCRIPTIONS.get(counter_name) | 229 description = DESCRIPTIONS.get(counter_name) |
| 230 display_name = counter_name.replace('.', '_') | 230 display_name = counter_name.replace('.', '_') |
| 231 results.AddValue(scalar.ScalarValue( | 231 results.AddValue(scalar.ScalarValue( |
| 232 results.current_page, display_name, 'kb', | 232 results.current_page, display_name, 'kb', |
| 233 self._results[counter_name] / 1024.0, description=description)) | 233 self._results[counter_name] / 1024.0, description=description, |
| 234 higher_is_better=False)) |
| OLD | NEW |