Chromium Code Reviews| 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 from metrics import Metric | 5 from metrics import Metric |
| 6 | 6 |
| 7 class IOMetric(Metric): | 7 class IOMetric(Metric): |
| 8 """IO-related metrics, obtained via telemetry.core.Browser.""" | 8 """IO-related metrics, obtained via telemetry.core.Browser.""" |
| 9 | 9 |
| 10 @classmethod | 10 @classmethod |
| 11 def CustomizeBrowserOptions(cls, options): | 11 def CustomizeBrowserOptions(cls, options): |
| 12 options.AppendExtraBrowserArg('--no-sandbox') | 12 options.extra_browser_args.add('--no-sandbox') |
|
tonyg
2013/09/05 00:26:15
Don't we want to be using AppendExtraBrowserArgs h
achuithb
2013/09/05 00:37:11
Done.
| |
| 13 | 13 |
| 14 def Start(self, page, tab): | 14 def Start(self, page, tab): |
| 15 raise NotImplementedError() | 15 raise NotImplementedError() |
| 16 | 16 |
| 17 def Stop(self, page, tab): | 17 def Stop(self, page, tab): |
| 18 raise NotImplementedError() | 18 raise NotImplementedError() |
| 19 | 19 |
| 20 def AddResults(self, tab, results): | 20 def AddResults(self, tab, results): |
| 21 # This metric currently only returns summary results, not per-page results. | 21 # This metric currently only returns summary results, not per-page results. |
| 22 raise NotImplementedError() | 22 raise NotImplementedError() |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 52 if 'WriteTransferCount' in io_stats[process_type_io]: | 52 if 'WriteTransferCount' in io_stats[process_type_io]: |
| 53 results.AddSummary('write_bytes_' + process_type_trace, 'kb', | 53 results.AddSummary('write_bytes_' + process_type_trace, 'kb', |
| 54 io_stats[process_type_io] | 54 io_stats[process_type_io] |
| 55 ['WriteTransferCount'] / 1024, | 55 ['WriteTransferCount'] / 1024, |
| 56 data_type='unimportant') | 56 data_type='unimportant') |
| 57 | 57 |
| 58 AddSummariesForProcessType('Browser', 'browser') | 58 AddSummariesForProcessType('Browser', 'browser') |
| 59 AddSummariesForProcessType('Renderer', 'renderer') | 59 AddSummariesForProcessType('Renderer', 'renderer') |
| 60 AddSummariesForProcessType('Gpu', 'gpu') | 60 AddSummariesForProcessType('Gpu', 'gpu') |
| 61 | 61 |
| OLD | NEW |