豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 45975b8

Browse files
Liviu RauDevtools-frontend LUCI CQ
authored andcommitted
Add performance tests documentation
Bug: 434612029 Change-Id: If69748ede217f376056163761b170da5243d7048 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7456064 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
1 parent 444ff17 commit 45975b8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/contributing/performance.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Performance testing
2+
3+
Performance tests run in Chromium infra to measure panel loading times. The `devtools_frontend` Crossbench benchmark collects the load time for the five major panels (elements, console, network, sources, resources) against three pages: [blank](about:blank), [speedometertests](https://chromium-workloads.web.app/speedometer/v3.1/?iterationCount=1&startAutomatically&suites=TodoMVC-Angular-Complex-DOM,TodoMVC-JavaScript-ES5-Complex-DOM,TodoMVC-React-Complex-DOM), and [dailybroadcast](https://browserben.ch/speedometer/v3.1/resources/newssite/news-next/dist/index.html).
4+
5+
Official results can be viewed on this [Skia-perf page](https://chrome-perf.corp.goog/m?begin=1767637318&end=1768242118&shortcut=53b911343bb42697c4a8e9f750aa421d&totalGraphs=1).
6+
7+
## How to run perf benchmark locally
8+
9+
Crossbench is available within the Chromium repository at `./tools/perf` and is kept up-to-date by running `gclient sync`. Alternatively you can clone the Crossbench [repo](sso://chromium/crossbench). The Crossbench executable is named `cb.py`.
10+
11+
To execute the full DevTools benchmark:
12+
`./cb.py devtools_frontend --repeat=N`.
13+
When --repeat argument is missing we run every scenario 2 times.
14+
15+
To execute the benchmark against a subset of panels and/or sites:
16+
`./cb.py devtools_frontend --panels=elements,resources --sites=blank,dailybroadcast`
17+
18+
To run the benchmark against a local Chromium build, specify the path to your browser executable:
19+
`./cb.py devtools_frontend --browser=path/to/chrome`
20+
21+
To run the benchmark against your local DevTools build:
22+
`./cb.py devtools-frontend --browser=path/to/chrome -- --custom-devtools-frontend=file://$(realpath ./path/to/devtools)`
23+
24+
At the end of each run, Crossbench generates a report and outputs its path. Review the `devtools_frontend_load_time.json` file in the report folder and compare your numbers with the official performance runs.

0 commit comments

Comments
 (0)