Chromium Code Reviews| Index: tools/perf/perf_tools/startup_tests.py |
| diff --git a/tools/perf/perf_tools/startup_tests.py b/tools/perf/perf_tools/startup_tests.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..eb8efd952b8e67c97abfc8b5d81f17a8ba9b2af2 |
| --- /dev/null |
| +++ b/tools/perf/perf_tools/startup_tests.py |
| @@ -0,0 +1,22 @@ |
| +# 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. |
| + |
| +from telemetry.page import page_benchmark |
| + |
| +# TODO(jeremy): Discard results from first iteration of warm tests. |
|
nduca
2013/03/12 18:47:41
This sounds like something you want to add as a fe
jeremy
2013/03/13 08:16:53
Agreed, will do so in followup patch.
|
| + |
| +# Test how long Chrome takes to load when warm. |
| +class PerfWarm(page_benchmark.PageBenchmark): |
| + def __init__(self): |
| + super(PerfWarm, self).__init__(needs_browser_restart_after_each_run=True) |
| + |
| + def CustomizeBrowserOptions(self, options): |
| + options.AppendExtraBrowserArg('--dom-automation') |
| + options.AppendExtraBrowserArg('--reduce-security-for-dom-automation-tests') |
| + |
| + def MeasurePage(self, page, tab, results): |
| + result = tab.EvaluateJavaScript( |
| + 'domAutomationController.getBrowserHistogram(' |
|
nduca
2013/03/12 18:47:41
there's a file in perf_tools for accessing histogr
jeremy
2013/03/13 08:16:53
The way i understand the code perf_tools/histogram
|
| + '"Startup.BrowserMessageLoopStartTimeFromMainEntry")') |
| + results.Add('startup_time', 'ms', result) |