Python: module telemetry.record_wpr

telemetry.record_wpr | index telemetry/record_wpr.py

`# Copyright 2012 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.`

Modules
`` |  |
argparse telemetry.benchmark telemetry.internal.util.binary_manager telemetry.internal.browser.browser_options | telemetry.internal.util.command_line telemetry.core.discover logging telemetry.page.page_test | telemetry.internal.results.results_options telemetry.story telemetry.internal.story_runner sys | telemetry.core.util telemetry.util.wpr_modes

Classes
`` |  | __builtin__.object WprRecorder telemetry.page.page_test.PageTest(__builtin__.object) RecorderPageTest
class RecorderPageTest(telemetry.page.page_test.PageTest)
`` |  | Method resolution order: RecorderPageTest telemetry.page.page_test.PageTest __builtin__.object Methods defined here: CleanUpAfterPage(self, page, tab) CustomizeBrowserOptions(self, options) DidNavigateToPage(self, page, tab) DidStartBrowser(self, browser) RunNavigateSteps(self, page, tab) ValidateAndMeasurePage(self, page, tab, results) WillNavigateToPage(self, page, tab) `Override to ensure all resources are fetched from network.` WillStartBrowser(self, browser) __init__(self) Methods inherited from telemetry.page.page_test.PageTest: DidRunPage(self, platform) `Called after the test run method was run, even if it failed.` RestartBrowserBeforeEachPage(self) `Should the browser be restarted for the page? This returns true if the test needs to unconditionally restart the browser for each page. It may be called before the browser is started.` SetOptions(self, options) `Sets the BrowserFinderOptions instance to use.` StopBrowserAfterPage(self, browser, page) `Should the browser be stopped after the page is run? This is called after a page is run to decide whether the browser needs to be stopped to clean up its state. If it is stopped, then it will be restarted to run the next page. A test that overrides this can look at both the page and the browser to decide whether it needs to stop the browser.` TabForPage(self, page, browser) `Override to select a different tab for the page. For instance, to create a new tab for every page, return browser.tabs.New().` Data descriptors inherited from telemetry.page.page_test.PageTest: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)` clear_cache_before_each_run `When set to True, the browser's disk and memory cache will be cleared before each run.` close_tabs_before_run `When set to True, all tabs are closed before running the test for the first time.` is_multi_tab_test `Returns True if the test opens multiple tabs. If the test overrides TabForPage, it is deemed a multi-tab test. Multi-tab tests do not retry after tab or browser crashes, whereas, single-tab tests too. That is because the state of multi-tab tests (e.g., how many tabs are open, etc.) is unknown after crashes.`
class WprRecorder(__builtin__.object)
`` |  | Methods defined here: CreateResults(self) HandleResults(self, results, upload_to_cloud_storage) Record(self, results) __init__(self, base_dir, target, args=None) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)` options

Functions
`` |  | Main(base_dir) `# TODO(nednguyen): use benchmark.Environment instead of base_dir for discovering # benchmark & story classes.`