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

Side by Side Diff: tools/perf/metrics/__init__.py

Issue 498563002: Delete now unused PageMeasurement class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/metrics/memory.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 class Metric(object): 5 class Metric(object):
6 """Base class for all the metrics that are used by telemetry measurements. 6 """Base class for all the metrics that are used by telemetry measurements.
7 7
8 The Metric class represents a way of measuring something. Metrics are 8 The Metric class represents a way of measuring something. Metrics are
9 helper classes used by PageMeasurements. Each PageMeasurement may use 9 helper classes used by PageTests. Each PageTest may use
10 multiple metrics; each metric should be focussed on collecting data 10 multiple metrics; each metric should be focussed on collecting data
11 about one thing. 11 about one thing.
12 """ 12 """
13 13
14 @classmethod 14 @classmethod
15 def CustomizeBrowserOptions(cls, options): 15 def CustomizeBrowserOptions(cls, options):
16 """Add browser options that are required by this metric. 16 """Add browser options that are required by this metric.
17 17
18 Some metrics do not have any special browser options that need 18 Some metrics do not have any special browser options that need
19 to be added, and they do not need to override this method; by 19 to be added, and they do not need to override this method; by
20 default, no browser options are added. 20 default, no browser options are added.
21 21
22 To add options here, call options.AppendExtraBrowserArgs(arg). 22 To add options here, call options.AppendExtraBrowserArgs(arg).
23 """ 23 """
24 pass 24 pass
25 25
26 def Start(self, page, tab): 26 def Start(self, page, tab):
27 """Start collecting data for this metric.""" 27 """Start collecting data for this metric."""
28 pass 28 pass
29 29
30 def Stop(self, page, tab): 30 def Stop(self, page, tab):
31 """Stop collecting data for this metric (if applicable).""" 31 """Stop collecting data for this metric (if applicable)."""
32 pass 32 pass
33 33
34 def AddResults(self, tab, results): 34 def AddResults(self, tab, results):
35 """Add the data collected into the results object for a measurement. 35 """Add the data collected into the results object for a measurement.
36 36
37 Metrics may implement AddResults to provide a common way to add results 37 Metrics may implement AddResults to provide a common way to add results
38 to the PageTestResults in PageMeasurement.AddMeasurement -- 38 to the PageTestResults in PageTest.ValidateOrMeasurePage --
39 results should be added with results.AddValue(...). 39 results should be added with results.AddValue(...).
40 """ 40 """
41 raise NotImplementedError() 41 raise NotImplementedError()
OLDNEW
« no previous file with comments | « no previous file | tools/perf/metrics/memory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698