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

Unified Diff: tools/perf/metrics/io.py

Issue 178943004: Rename tools/perf/metrics/io.py to resolve naming conflicts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: upload again after failed Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/measurements/page_cycler.py ('k') | tools/perf/metrics/iometric.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/io.py
diff --git a/tools/perf/metrics/io.py b/tools/perf/metrics/io.py
deleted file mode 100644
index 998581c0d617755064bd5d4aac84c3ca814765c3..0000000000000000000000000000000000000000
--- a/tools/perf/metrics/io.py
+++ /dev/null
@@ -1,61 +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."""
-
- @classmethod
- def CustomizeBrowserOptions(cls, options):
- options.AppendExtraBrowserArgs('--no-sandbox')
-
- 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, browser, results):
- """Add summary results to the results object."""
- io_stats = 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')
-
« no previous file with comments | « tools/perf/measurements/page_cycler.py ('k') | tools/perf/metrics/iometric.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698