Commit 9f5df0d2 authored by Aran Gilman's avatar Aran Gilman Committed by Commit Bot

Update and reformat perf.md.

In particular, the following were changed:
 * Reduce wordiness.
 * Run mdformat.
 * Remove information about SCOPED_TRACE(), since that appears to be
   outdated (or maybe just misleading).
 * Replace section on Google-internal script with link to internal
   Chrome A11y page on the topic.

Change-Id: I94e3a47f435f092b225a60ae2e35c06ddba8d2ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1555417Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652853}
parent deef766a
# Accessibility Performance Measurements # Accessibility Performance Measurements
Accessibility support in Chromium can be expensive, so we have some Accessibility support can have a negative impact on performance, so it is
performance tests to help catch regressions and encourage important to test for regressions and to improve performance over time. This can
improving performance over time. be done with Chromium's performance testing framework,
[Telemetry](https://chromium.googlesource.com/catapult/+/HEAD/telemetry/README.md).
As background material, read up on The metrics for accessibility are defined in
[Telemetry](https://chromium.googlesource.com/catapult/+/HEAD/telemetry/README.md), [third_party/catapult/tracing/tracing/metrics/accessibility_metric.html](https://cs.chromium.org/chromium/src/third_party/catapult/tracing/tracing/metrics/accessibility_metric.html).
Chromium's performance testing framework.
The metrics for accessibility are defined here:
```third_party/catapult/tracing/tracing/metrics/accessibility_metric.html```
They measure the time spent in three key parts of accessibility code
in Chrome, wherever you see SCOPED_TRACE. If there's any nontrivial
code that you think is being called that isn't covered now, the first
step would be to add a new SCOPED_TRACE, then update this metric to
start tracking it.
## Stories ## Stories
The stories are defined here: A story is a url to load and actions to take on that page.
```tools/perf/page_sets/system_health/accessibility_stories.py```
A story is a url to load and other actions to take on that page. The Accessibility stories are defined in
accessibility stories are also configured to run with accessibility [tools/perf/page_sets/system_health/accessibility_stories.py](https://cs.chromium.org/chromium/src/tools/perf/page_sets/system_health/accessibility_stories.py).
enabled via the command-line flag. If a particular web page seems slow, you may add a new story here to track its
performance.
If there's a particular web page that seems slow and you'd like to ### Running stories from the command line
start tracking its performance, the first step would be to try adding
a new story here.
Here's an example command line to run all of the accessibility stories To run all accessibility stories locally using the currently installed Canary
locally using the currently installed Canary browser: browser:
```tools/perf/run_benchmark system_health.common_desktop --story-filter="accessibility.*" --browser canary``` ```shell
tools/perf/run_benchmark system_health.common_desktop \
--story-filter="accessibility.*" \
--browser canary
```
To run the same set of tests on your own compiled version of Chrome: To run the same set of tests on your own compiled version of Chrome:
```tools/perf/run_benchmark system_health.common_desktop --story-filter="accessibility.*" --browser=exact --browser-executable=out/Release/chrome``` ```shell
tools/perf/run_benchmark system_health.common_desktop \
--story-filter="accessibility.*" \
--browser=exact \
--browser-executable=out/Release/chrome
```
See the [documentation](https://github.com/catapult-project/catapult/blob/master/telemetry/docs/run_benchmarks_locally.md) For more information, see the
or command-line help for tools/perf/run_benchmark for [Telemetry documentation](https://github.com/catapult-project/catapult/blob/master/telemetry/docs/run_benchmarks_locally.md)
more command-line arguments. or command-line help for tools/perf/run_benchmark.
Here's an example command line to run to capture the web page replay for ### Capture web page replay for new or modified stories
all accessibility stories, if you add a new story or update an existing one:
```tools/perf/record_wpr desktop_system_health_story_set --story-filter="accessibility.*" --browser canary``` You should capture web page replay information whenever you add or modify a
story. The following command captures the web page replay for all accessibility
stories:
Running this will upload the web page replay data captured and modify this ```shell
file, which should be submitted as part of your changelist: tools/perf/record_wpr desktop_system_health_story_set \
--story-filter="accessibility.*" \
--browser canary
```
```tools/perf/page_sets/data/system_health_desktop.json``` Running this will upload the web page replay data captured and modify
[tools/perf/page_sets/data/system_health_desktop.json](https://cs.chromium.org/chromium/src/tools/perf/page_sets/data/system_health_desktop.json),
For more information, see [Record a page set](https://sites.google.com/a/chromium.org/dev/developers/telemetry/record_a_page_set). which should be submitted as part of your changelist. For more information, see
[Record a page set](https://sites.google.com/a/chromium.org/dev/developers/telemetry/record_a_page_set).
## Blink Perf ## Blink Perf
In addition, we have Blink perf tests here. These are microbenchmarks Blink perf tests are microbenchmarks that track the performance of a small
intended to track the performance of a small function or operation function or operation in isolation. You can find these tests in
in isolation. You can find these tests here: [third_party/blink/perf_tests/accessibility/](https://cs.chromium.org/chromium/src/third_party/blink/perf_tests/accessibility/).
```third_party/blink/perf_tests/accessibility/```
Example command line to run these tests locally on your own compiled Chrome: To run these tests locally on your own compiled Chrome:
```tools/perf/run_benchmark blink_perf.accessibility --browser=exact --browser-executable=out/Release/chrome``` ```shell
tools/perf/run_benchmark blink_perf.accessibility \
--browser=exact \
--browser-executable=out/Release/chrome
```
## Results ## Results
The results can be found at The results can be found at
[https://chromeperf.appspot.com](chromeperf.appspot.com). [https://chromeperf.appspot.com](chromeperf.appspot.com).
Because that site displays graphs, we also maintain a command-line
script (Google-internal only) as a more accessible alternative way to
examine the same data via the command line.
To get the script:
```git clone sso://user/dmazzoni/chrome-accessibility-site``` and then run: ## Google-internal Info
```./accessibility_issues.py perf``` More information on analytics and performance, including some additional
Google-internal resources, can be found at
[go/chrome-a11y/resources/analytics-performance](http://go/chrome-a11y/resources/analytics-performance).
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment