loadline
它能做什么
这个技能向你的 AI 展示如何使用 Crossbench 工具运行 LoadLine 页面加载基准测试。适合需要衡量 Chrome 速度或收集性能追踪的工程师。
适用场景
- ✓当你想衡量网页在手机或平板 Chrome 上的加载速度时。
- ✓当你需要测试某项代码修改会让页面加载变快还是变慢时。
- ✓当你想收集一次页面加载的 Perfetto 追踪以进行分析时。
技能链接
https://github.com/chromium/chromium/blob/main/agents/skills/loadline/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“能在我的 Android Chrome 上运行 LoadLine 手机基准测试,并告诉我页面加载时间的情况吗?”
每周 5 个新技能,1 分钟读完。
工作原理
AI 选择一个 LoadLine 变体、一个浏览器和一组网页故事,然后运行 Crossbench 脚本,并指定重复次数。之后,它会报告结果或追踪。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
LoadLine Benchmark
This skill guides the usage of LoadLine benchmarks to measure browser page loading performance by simulating real-world user journeys (loading a web page).
Quick Start
Read third_party/crossbench/config/benchmark/loadline2/README.md for basic
info on the LoadLine benchmark.
The entry point for all LoadLine benchmarks is the Crossbench script:
third_party/crossbench/cb.py
Common Command Pattern
third_party/crossbench/cb.py <variant> --browser=<browser> --stories=<stories> --repetitions=<N>
Benchmark Variants
| Variant | Description |
|---|---|
loadline2-phone |
The latest LoadLine 2 benchmark optimized for mobile phones. |
loadline2-tablet |
LoadLine 2 benchmark optimized for tablets. |
loadline-phone |
Legacy LoadLine 1 benchmark for phones. |
loadline-tablet |
Legacy LoadLine 1 benchmark for tablets. |
*-debug |
Appends more tracing categories for easier debugging. |
Target Browsers (--browser)
- Android (Chrome): Use
--browser=adb:chrome(if one device) or--browser=$SERIAL:chrome. - Local Build: Use the path to the output directory, e.g.,
--browser=out/Release/chrome. - System Chrome: Use
--browser=chrome-stable,chrome-canary, etc.
Stories (--stories)
Default stories for LoadLine 2:
amazon_productcnn_articlewikipedia_articleglobo_homepagegoogle_search_result
Skip --stories flag to run everything or provide a comma-separated list for
specific stories.
Analyzing Results
LoadLine outputs two kinds of numbers: scores and breakdown.
Scores are in runs-per-minute, so higher is better. The main metric is called TOTAL_SCORE, this is the most stable and representative number.
Breakdown values are in milliseconds, so lower is better. Can be useful for analyzing which loading stage was affected in particular.
Statistical Significance
- Noise: Benchmark results are inherently noisy. A single repetition should only be used for smoke-testing.
- Reliability: To confidently determine changes of 1% or higher, run the benchmark with at least 50 repetitions.
- Interpretation: Changes below 1% are typically not considered statistically significant, even with 50 repetitions.
Identifying Tested Version
You can find the exact version of Chrome being tested in the benchmark logs by
looking for the 🏷️ STARTING BROWSER Version: line:
🏷️ STARTING BROWSER Version: 138.0.7204.168 stable
Common Workflows
Full Basic Run
Run the full benchmark on a connected Android device:
third_party/crossbench/cb.py loadline2-phone --browser=adb:chrome
Test a feature flag
See if a feature flag affects page loading performance:
third_party/crossbench/cb.py loadline2-phone --browser-config=feature_flag.hjson
where feature_flag.hjson looks like this:
{
flags: {
"experiment": {
"enabled": "--enable-features=YourFeature",
"disabled": "--disable-features=YourFeature",
},
},
browsers: {
"chrome": {
browser: "chrome",
driver: "adb",
flags: [ "experiment" ],
},
},
}
Compare past versions of Chrome
Check if clank/bin/install_chrome.py exists. If not (chromium-only checkouts),
see the next section for building Chromium locally.
Use clank/bin/install_chrome.py to install past versions on the connected
device. E.g.
clank/bin/install_chrome.py --channel dev --milestone 146 --signed
will install M146 with "Dev" channel branding. You can use multiple brandings to compare versions on the same device. E.g. install Canary:
clank/bin/install_chrome.py --channel canary --milestone 147 --signed
And then run LoadLine with two browsers:
third_party/crossbench/cb.py loadline2-phone --browser=adb:chrome-dev --browser=adb:chrome-canary
This will compare M146 and M147 on the same device.
Custom-built Chrome
- Build Chrome for Android with
android_channel="canary"gn arg. - Uninstall existing Chrome Canary from the device:
adb shell pm uninstall com.chrome.canary(this command fails if it's not installed; this is fine and can be ignored) - Install the custom built Chrome:
adb install out/$OUT_DIR/apks/Chrome.apk - Run LoadLine on chrome-canary:
third_party/crossbench/cb.py loadline2-phone --browser=adb:chrome-canary
Short run
Before running a full run on a custom-built Chrome, first try with a single re
常见问题
什么是 LoadLine?
LoadLine 是一组基准测试,它在浏览器中加载真实网页,并衡量加载所需的时间。
什么是 Crossbench?
Crossbench 是运行 LoadLine 和其他浏览器基准测试的工具。技能使用它的命令行脚本。
我可以在普通电脑浏览器上运行吗?
可以。技能也可以使用本地 Chrome 构建版或系统 Chrome 运行,而不仅限于 Android。
详情
作者的原始描述
Running and analyzing LoadLine 1 and 2 benchmarks on Android using Crossbench. Use when you need to measure page loading performance, evaluate performance-related changes in Chrome, or collect Perfetto traces with realistic Chrome workload.
repo: chromium/chromium
热度
- GitHub 星标
- 25k
- 排名
- #10061
- 许可证
- BSD-3-Clause
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
fuzzing
25k帮你的智能体编写模糊测试,向代码输入大量随机数据,以找出 C++ 代码中的崩溃和错误。
gn-deps-debugging
25k帮你的智能体修复 GN 构建文件中因依赖缺失或错误而导致的构建错误,且不添加范围过大、不必要的依赖。
java-memory-leaks
25k帮你的智能体通过读取 LeakCanary 的泄漏报告,查找并修复 Android 应用中的 Java 内存泄漏。
jni-type-conversion
25k帮你的智能体用更简单的 @JniType 注解,替换 Android 代码中手动的 Java 到 C++ 转换代码。