We record page sets so we control network conditions and other changes in the live sites, leading to more stable benchmarks. Write a page setBefore you can record a page set, you need to write it! If you want to record a pre-existing page set, you can skip this step. Page sets are located in from telemetry.page import page
from telemetry.page import page_set
class MyPageSet(page_set.PageSet):
def __init__(self):
super(MyPageSet, self).__init__(
user_agent_type='desktop',
archive_data_file='data/my_page_set.json',
bucket=page_set.PUBLIC_BUCKET)
self.AddPage(page.Page(
name='example',
url='http://example.com/',
page_set=self)) Telemetry spoofs Chrome's User-Agent field, and The Note that the naming convention of page set file is to lowercase & underscore class name, e.g. MyPageSet should be stored as my_page_set.py. Choosing a bucketTelemetry has three Cloud Storage buckets you can put page sets in.
Google wants to avoid legal issues with distributing third-party content, so to be safe, most recordings of websites on the public web go in Record a page set or benchmarkUse the src$ tools/perf/record_wpr --browser=(release|system) <page_set_name or benchmark name> For example, to record the top25_smooth.py page set, specify top25_smooth_page_set: src$ tools/perf/record_wpr --browser=system top25_smooth_page_set To update the recording for only some pages in the page set, use src$ tools/perf/record_wpr --browser=system --story-filter=wikipedia top25_smooth_page_set
Upload the recording to Cloud StorageTo avoid bloating everyone's Chromium checkouts, we avoid committing the large If you haven't already, you may need to set up Cloud Storage. To do this, check in only the To upload your new recording to cloud storage, use the following command, as referenced in the presubmit warning: src$ depot_tools/upload_to_google_storage.py --bucket (chromium-telemetry|chrome-partner-telemetry|chrome-telemetry) tools/perf/page_sets/data/my_page_set_000.wpr Moving recordings between Cloud Storage bucketsSometimes the addition or removal of pages changes the permission of the page set, or the page set archives are in the wrong bucket. To move files between buckets, use this command: src$ tools/telemetry/cloud_storage mv tools/perf/page_sets/data/my_page_set_*.wpr (public|partner|google-only) What is Web Page Replay?Web Page Replay is a service that allows us to capture and store HTTP requests and responses. |
For Developers > Telemetry: Introduction >