• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..16-Feb-2021-

benchmarks/H03-May-2022-3,7252,471

chrome_telemetry_build/H03-May-2022-291246

clear_system_cache/H16-Feb-2021-7854

cli_tools/H16-Feb-2021-5,1834,015

contrib/H16-Feb-2021-5,2603,974

core/H16-Feb-2021-66,84963,774

examples/H16-Feb-2021-3633

experimental/H16-Feb-2021-797610

measurements/H16-Feb-2021-359245

metrics/H16-Feb-2021-3120

page_sets/H03-May-2022-29,02624,711

testdata/H03-May-2022-1,2611,229

.gitignoreH A D16-Feb-202182 76

BUILD.gnH A D16-Feb-20212.6 KiB10381

DIR_METADATAH A D16-Feb-2021405 1110

OWNERSH A D16-Feb-2021518 2618

PRESUBMIT.pyH A D16-Feb-20215.7 KiB175149

README.mdH A D16-Feb-20217.3 KiB164111

benchmark.csvH A D16-Feb-202110.6 KiB7473

bootstrap_depsH A D16-Feb-20211.3 KiB3532

diagnose_test_failureH A D16-Feb-20213.3 KiB10885

expectations.configH A D16-Feb-202133.2 KiB442408

export_csvH A D16-Feb-20211.4 KiB5841

fetch_benchmark_deps.pyH A D16-Feb-20215.1 KiB141100

fetch_benchmark_deps_unittest.pyH A D16-Feb-20212.8 KiB7957

find_dependenciesH A D16-Feb-2021372 166

flakiness_cliH A D16-Feb-2021446 177

generate_legacy_perf_dashboard_json.pyH A D16-Feb-20219.4 KiB271201

generate_legacy_perf_dashboard_json_unittest.pyH A D16-Feb-20213.4 KiB10273

generate_perf_dataH A D16-Feb-2021374 166

generate_perf_sharding.pyH A D16-Feb-202113.6 KiB350287

list_affected_benchmarksH A D16-Feb-2021931 3321

list_benchmarksH A D16-Feb-20211 KiB4225

pinboardH A D16-Feb-2021455 2111

pinpoint_cliH A D16-Feb-20212.4 KiB7357

process_perf_results.pyH A D16-Feb-202124.9 KiB676508

process_perf_results_unittest.pyH A D16-Feb-202110.9 KiB287241

pylintrcH A D16-Feb-20211.1 KiB5543

record_wprH A D16-Feb-2021565 1910

results_processorH A D16-Feb-2021385 177

run_benchmarkH A D16-Feb-2021420 187

run_gtest_benchmark.pyH A D16-Feb-20214.1 KiB13193

run_rendering_benchmark_with_gated_performance_unittest.pyH A D16-Feb-202112.8 KiB356296

run_telemetry_testsH A D16-Feb-2021983 3522

run_testsH A D16-Feb-2021717 2916

scripts_smoke_unittest.pyH A D16-Feb-202116.4 KiB393342

soundwaveH A D16-Feb-20213.6 KiB10182

system_health_stories.csvH A D16-Feb-20218.5 KiB125124

update_wprH A D16-Feb-2021360 166

validate_perf_json_configH A D16-Feb-2021388 166

validate_story_expectation_dataH A D16-Feb-2021378 166

validate_tbmv3_metricH A D16-Feb-2021481 2111

validate_wpr_archivesH A D16-Feb-20213.5 KiB11489

README.md

1<!-- Copyright 2020 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
6# Chrome Benchmarking System
7
8# Overview
9
10This directory contains benchmarks and infrastructure to test Chrome and
11Chromium and output performance measurements. These benchmarks are continuously
12run on the [perf waterfall](https://ci.chromium.org/p/chrome/g/chrome.perf/console).
13
14For more information on how Chrome measures performance, see
15[here](/docs/speed/how_does_chrome_measure_performance.md).
16
17# Using The Chrome Benchmarking System
18
19## Analyzing Results From The Perf Waterfall
20
21The [ChromePerf Dashboard](https://chromeperf.appspot.com/) is the destination
22for all metrics generated by the perf waterfall. It provides tools to set up a
23dashboard for performance of a set of tests + metrics over time. In addition, it
24provides the ability to launch a bisection by selecting a point on the
25dashboard.
26
27## Running A Single Test
28
29The Chrome Benchmarking System has two methods for manually running performance tests:
30run_benchmark and Pinpoint.
31
32run_benchmark is useful for creating and debugging benchmarks using local
33devices. Run from the command line, it has a number of flags useful for
34determining the internal state of the benchmark. For more information, see
35[here](https://chromium.googlesource.com/catapult.git/+/HEAD/telemetry/docs/run_benchmarks_locally.md).
36
37[Pinpoint](https://pinpoint-dot-chromeperf.appspot.com/) wraps run_benchmark and
38provides the ability to remotely run A/B benchmarks using any platform available
39in our lab. It will run a benchmark for as many iterations as needed to get a
40statistically significant result, then visualize it.
41
42If your're trying to debug a test or figure out how the infrastructure works,
43the easiest way is to set up the debugger in VSCode (guide
44[here](../../docs/vscode_python.md))] and set a breakpoint in
45/tools/perf/core/benchmark_runner.py.
46
47## Creating New Tests (stories)
48
49[This document](https://chromium.googlesource.com/catapult.git/+/HEAD/telemetry)
50provides an oveview of how tests are structured and some of the underlying
51technologies. After reading that doc, figure out if your story fits into an
52existing benchmark by checking
53[here](https://goto.google.com/chrome-benchmarking-sheet) (or
54[here](https://bit.ly/chrome-benchmarks) for non-Googlers).
55
56* If it does, follow the instructions next to it. If there are no instructions,
57  find the test type in src/tools/perf/page_sets.
58* Otherwise, read [this](https://docs.google.com/document/d/1ni2MIeVnlH4bTj4yvEDMVNxgL73PqK_O9_NUm3NW3BA/edit).
59
60After figuring out where your story fits, create a new one. There is a
61considerable amount of variation between different benchmarks, so use a nearby
62story as a model. You may also need to introduce custom JavaScript to drive
63interactions on the page or to deal with nondeterminsim. For an example, search
64[this file](https://source.chromium.org/chromium/chromium/src/+/master:tools/perf/page_sets/system_health/browsing_stories.py?q=browsing_stories.py&ss=chromium)
65for browse:tools:sheets:2019.
66
67Next, we need to use WPR (WebPageReplay) to record all of the content requested by the test. By default,
68tests spin up a local webserver using these recordings, removing one source of
69nondeterminism. To do that, run:
70
71```./tools/perf/record_wpr --browser=system --story-filter=STORY_NAME BENCHMARK_NAME```
72
73Next, we need to verify the recording works. To do so, run the test:
74
75```./tools/perf/run_benchmark run BENCHMARK_NAME --browser=system --story-filter=STORY_NAME ```
76
77After running this, you will need to verify the following:
78
79* Does the browser behave the same as it did when creating the recording? If not, is the difference in behavior acceptable?
80* Are there any concerning errors generated by Chrome when running run_benchmark? These will appear in the output of run_benchmark.
81* Check the benchmarks in the link generated by run_benchmark. Does everything look reasonable?
82
83If any problems were encountered, review or add custom JavaScript as described in the previous section. Alternatively, ask for help.
84
85If everything looks good, upload your WPR archive by following the instructions
86in [Upload the recording to Cloud Storage](https://sites.google.com/a/chromium.org/dev/developers/telemetry/record_a_page_set)
87and create a CL.
88
89# Tools In This Directory
90
91This directory contains a variety of tools that can be used to run benchmarks,
92interact with speed services, and manage performance waterfall configurations.
93It also has commands for running functional unittests.
94
95## run_tests
96
97This command allows you to run functional tests against the python code in this
98directory. For example, try:
99
100```
101./run_tests results_dashboard_unittest
102```
103
104Note that the positional argument can be any substring within the test name.
105
106This may require you to set up your `gsutil config` first.
107
108## run_benchmark
109
110This command allows running benchmarks defined in the chromium repository,
111specifically in [tools/perf/benchmarks][benchmarks_dir]. If you need it,
112documentation is available on how to [run benchmarks locally][run_locally] and
113how to properly [set up your device][device_setup].
114
115[benchmarks_dir]: https://cs.chromium.org/chromium/src/tools/perf/benchmarks/
116[run_locally]: https://chromium.googlesource.com/catapult.git/+/HEAD/telemetry/docs/run_benchmarks_locally.md
117[device_setup]: /docs/speed/benchmark/telemetry_device_setup.md
118
119## update_wpr
120
121A helper script to automate various tasks related to the update of
122[Web Page Recordings][wpr] for our benchmarks. In can help creating new
123recordings from live websites, replay those to make sure they work, upload them
124to cloud storage, and finally send a CL to review with the new recordings.
125
126[wpr]: https://github.com/catapult-project/catapult/tree/master/web_page_replay_go
127
128## pinpoint_cli
129
130A command line interface to the [pinpoint][] service. Allows to create new jobs,
131check the status of jobs, and fetch their measurements as csv files.
132
133[pinpoint]: https://pinpoint-dot-chromeperf.appspot.com
134
135## flakiness_cli
136
137A command line interface to the [flakiness dashboard][].
138
139[flakiness dashboard]: https://test-results.appspot.com/dashboards/flakiness_dashboard.html
140
141## soundwave
142
143Allows to fetch data from the [Chrome Performance Dashboard][chromeperf] and
144stores it locally on a SQLite database for further analysis and processing. It
145also allows defining [studies][], pre-sets of measurements a team is interested
146in tracking, and uploads them to cloud storage to visualize with the help of
147[Data Studio][]. This currently backs the [v8][v8_dashboard] and
148[health][health_dashboard] dashboards.
149
150[chromeperf]: https://chromeperf.appspot.com/
151[studies]: https://cs.chromium.org/chromium/src/tools/perf/cli_tools/soundwave/studies/
152[Data Studio]: https://datastudio.google.com/
153[v8_dashboard]: https://datastudio.google.com/s/iNcXppkP3DI
154[health_dashboard]: https://datastudio.google.com/s/jUXfKZXXfT8
155
156## pinboard
157
158Allows scheduling daily [pinpoint][] jobs to compare measurements with/without a
159patch being applied. This is useful for teams developing a new feature behind a
160flag, who wants to track the effects on performance as the development of their
161feature progresses. Processed data for relevant measurements is uploaded to
162cloud storage, where it can be read by [Data Studio][]. This also backs data
163displayed on the [v8][v8_dashboard] dashboard.
164