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

Side by Side Diff: tools/perf/measurements/page_cycler.py

Issue 18261009: Have repeats understand "time" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing perf tests Created 7 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 | « tools/perf/benchmarks/dom_perf.py ('k') | tools/telemetry/telemetry/core/browser_options.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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """The page cycler measurement. 5 """The page cycler measurement.
6 6
7 This measurement registers a window load handler in which is forces a layout and 7 This measurement registers a window load handler in which is forces a layout and
8 then records the value of performance.now(). This call to now() measures the 8 then records the value of performance.now(). This call to now() measures the
9 time from navigationStart (immediately after the previous page's beforeunload 9 time from navigationStart (immediately after the previous page's beforeunload
10 event) until after the layout in the page's load event. In addition, two garbage 10 event) until after the layout in the page's load event. In addition, two garbage
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return bool(tab.EvaluateJavaScript('__pc_load_time')) 118 return bool(tab.EvaluateJavaScript('__pc_load_time'))
119 util.WaitFor(_IsDone, 60) 119 util.WaitFor(_IsDone, 60)
120 120
121 for h in self._histograms: 121 for h in self._histograms:
122 h.GetValue(page, tab, results) 122 h.GetValue(page, tab, results)
123 123
124 results.Add('page_load_time', 'ms', 124 results.Add('page_load_time', 'ms',
125 int(float(tab.EvaluateJavaScript('__pc_load_time'))), 125 int(float(tab.EvaluateJavaScript('__pc_load_time'))),
126 chart_name='times') 126 chart_name='times')
127 127
128 def DidRunPageSet(self, tab, results): 128 def DidRunTest(self, tab, results):
129 self._memory_metrics.StopAndGetResults(tab.browser, results) 129 self._memory_metrics.StopAndGetResults(tab.browser, results)
130 self.MeasureIO(tab, results) 130 self.MeasureIO(tab, results)
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/dom_perf.py ('k') | tools/telemetry/telemetry/core/browser_options.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698