diff options
Diffstat (limited to 'chromium/tools/perf/metrics/io.py')
-rw-r--r-- | chromium/tools/perf/metrics/io.py | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/chromium/tools/perf/metrics/io.py b/chromium/tools/perf/metrics/io.py deleted file mode 100644 index 29d186405ae..00000000000 --- a/chromium/tools/perf/metrics/io.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from metrics import Metric - -class IOMetric(Metric): - """IO-related metrics, obtained via telemetry.core.Browser.""" - - def Start(self, page, tab): - raise NotImplementedError() - - def Stop(self, page, tab): - raise NotImplementedError() - - def AddResults(self, tab, results): - # This metric currently only returns summary results, not per-page results. - raise NotImplementedError() - - def AddSummaryResults(self, tab, results): - """Add summary results to the results object.""" - io_stats = tab.browser.io_stats - if not io_stats['Browser']: - return - - def AddSummariesForProcessType(process_type_io, process_type_trace): - """For a given process type, add all relevant summary results. - - Args: - process_type_io: Type of process (eg Browser or Renderer). - process_type_trace: String to be added to the trace name in the results. - """ - if 'ReadOperationCount' in io_stats[process_type_io]: - results.AddSummary('read_operations_' + process_type_trace, 'count', - io_stats[process_type_io] - ['ReadOperationCount'], - data_type='unimportant') - if 'WriteOperationCount' in io_stats[process_type_io]: - results.AddSummary('write_operations_' + process_type_trace, 'count', - io_stats[process_type_io] - ['WriteOperationCount'], - data_type='unimportant') - if 'ReadTransferCount' in io_stats[process_type_io]: - results.AddSummary('read_bytes_' + process_type_trace, 'kb', - io_stats[process_type_io] - ['ReadTransferCount'] / 1024, - data_type='unimportant') - if 'WriteTransferCount' in io_stats[process_type_io]: - results.AddSummary('write_bytes_' + process_type_trace, 'kb', - io_stats[process_type_io] - ['WriteTransferCount'] / 1024, - data_type='unimportant') - - AddSummariesForProcessType('Browser', 'browser') - AddSummariesForProcessType('Renderer', 'renderer') - AddSummariesForProcessType('Gpu', 'gpu') - |