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

Side by Side Diff: tools/perf/perf_tools/histogram_metric.py

Issue 12389073: Collect tab timing information for use in telementry-based startup tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix telemetry tests with reference builds. Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 from perf_tools import histogram as histogram_module 4 from perf_tools import histogram as histogram_module
5 5
6 BROWSER_HISTOGRAM = 'browser_histogram' 6 BROWSER_HISTOGRAM = 'browser_histogram'
7 RENDERER_HISTOGRAM = 'renderer_histogram' 7 RENDERER_HISTOGRAM = 'renderer_histogram'
8 8
9 class HistogramMetric(object): 9 class HistogramMetric(object):
10 def __init__(self, histogram, histogram_type): 10 def __init__(self, histogram, histogram_type):
(...skipping 18 matching lines...) Expand all
29 results.Add(self.name, self.units, new_histogram, 29 results.Add(self.name, self.units, new_histogram,
30 data_type='unimportant-histogram') 30 data_type='unimportant-histogram')
31 31
32 @property 32 @property
33 def histogram_function(self): 33 def histogram_function(self):
34 if self.histogram_type == BROWSER_HISTOGRAM: 34 if self.histogram_type == BROWSER_HISTOGRAM:
35 return 'getBrowserHistogram' 35 return 'getBrowserHistogram'
36 return 'getHistogram' 36 return 'getHistogram'
37 37
38 def _GetHistogramFromDomAutomation(self, tab): 38 def _GetHistogramFromDomAutomation(self, tab):
39 js = ('window.domAutomationController.%s ? ' 39 # TODO(jeremy): Remove references to
40 'window.domAutomationController.%s("%s") : ""' % 40 # domAutomationController when we update the reference builds.
tonyg 2013/05/29 15:39:00 Looks like we lost the branch where neither domAut
41 (self.histogram_function, self.histogram_function, self.name)) 41 js = ('(window.statsCollectionController ? '
42 'statsCollectionController : '
43 'domAutomationController).%s("%s")' %
44 (self.histogram_function, self.name))
42 return tab.EvaluateJavaScript(js) 45 return tab.EvaluateJavaScript(js)
OLDNEW
« no previous file with comments | « content/renderer/stats_collection_observer.cc ('k') | tools/perf/perf_tools/memory_measurement.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698