| OLD | NEW |
| (Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from telemetry.page import page_benchmark |
| 6 |
| 7 # TODO(jeremy): Discard results from first iteration of warm tests. |
| 8 |
| 9 # Test how long Chrome takes to load when warm. |
| 10 class PerfWarm(page_benchmark.PageBenchmark): |
| 11 def __init__(self): |
| 12 super(PerfWarm, self).__init__(needs_browser_restart_after_each_run=True) |
| 13 |
| 14 def CustomizeBrowserOptions(self, options): |
| 15 options.AppendExtraBrowserArg('--dom-automation') |
| 16 options.AppendExtraBrowserArg('--reduce-security-for-dom-automation-tests') |
| 17 |
| 18 def MeasurePage(self, page, tab, results): |
| 19 result = tab.EvaluateJavaScript(""" |
| 20 domAutomationController.getBrowserHistogram( |
| 21 "Startup.BrowserMessageLoopStartTimeFromMainEntry") |
| 22 """) |
| 23 results.Add('startup_time', 'ms', result) |
| OLD | NEW |