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

Unified Diff: tools/perf/measurements/startup_warm.py

Issue 22300013: Add a Telemetry based cold startup test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/measurements/startup.py ('k') | tools/perf/run_measurement » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/startup_warm.py
diff --git a/tools/perf/measurements/startup_warm.py b/tools/perf/measurements/startup_warm.py
deleted file mode 100644
index 7c346b5c50e2d34323210a7dc3b14410f25b1fe0..0000000000000000000000000000000000000000
--- a/tools/perf/measurements/startup_warm.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (c) 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.
-
-import json
-
-from telemetry.page import page_measurement
-
-
-class StartupWarm(page_measurement.PageMeasurement):
- """Test how long Chrome takes to load when warm."""
- HISTOGRAMS_TO_RECORD = {
- 'messageloop_start_time' :
- 'Startup.BrowserMessageLoopStartTimeFromMainEntry',
- 'window_display_time' : 'Startup.BrowserWindowDisplay',
- 'open_tabs_time' : 'Startup.BrowserOpenTabs'}
-
- def __init__(self):
- super(StartupWarm, self).__init__(needs_browser_restart_after_each_run=True,
- discard_first_result=True)
-
- def CustomizeBrowserOptions(self, options):
- options.AppendExtraBrowserArg('--enable-stats-collection-bindings')
-
- # Old commandline flags used for reference builds.
- options.AppendExtraBrowserArg('--dom-automation')
- options.AppendExtraBrowserArg(
- '--reduce-security-for-dom-automation-tests')
-
- def MeasurePage(self, page, tab, results):
- # TODO(jeremy): Remove references to
- # domAutomationController.getBrowserHistogram when we update the reference
- # builds.
- get_histogram_js = ('(window.statsCollectionController ?'
- 'statsCollectionController :'
- 'domAutomationController).getBrowserHistogram("%s")')
-
-
- for display_name, histogram_name in self.HISTOGRAMS_TO_RECORD.iteritems():
- result = tab.EvaluateJavaScript(get_histogram_js % histogram_name)
- result = json.loads(result)
- measured_time = 0
-
- if 'sum' in result:
- # For all the histograms logged here, there's a single entry so sum
- # is the exact value for that entry.
- measured_time = result['sum']
- elif 'buckets' in result:
- measured_time = \
- (result['buckets'][0]['high'] + result['buckets'][0]['low']) / 2
-
- results.Add(display_name, 'ms', measured_time)
« no previous file with comments | « tools/perf/measurements/startup.py ('k') | tools/perf/run_measurement » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698