Skip to content

Conversation

jonathan-j-lee
Copy link
Contributor

@jonathan-j-lee jonathan-j-lee commented Aug 15, 2025

When wpt run --trace-categories is specified, the trace events are retrieved from an internal ChromeDriver buffer and logged as an extra test result field. The trace will be consumed by an event listener on the Chromium side (https://crrev.com/c/6820247) and can be viewed in https://ui.perfetto.dev/.

Partially fulfills https://crbug.com/434017035

When `wpt run --trace-categories` is specified, the trace events [0] are
retrieved from an internal ChromeDriver buffer and logged as an `extra`
test result field. The trace will be consumed by an event listener on
the Chromium side (https://crrev.com/c/6820247) and can be viewed in
https://ui.perfetto.dev/.

Partially fulfills crbug.com/434017035

[0]: https://developer.chrome.com/docs/chromedriver/logging/performance-log
@jonathan-j-lee jonathan-j-lee force-pushed the wptrunner/chrome-tracing branch from 8b013be to 03050e2 Compare August 15, 2025 21:18
@jonathan-j-lee jonathan-j-lee marked this pull request as ready for review August 15, 2025 22:02
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Aug 15, 2025
@jonathan-j-lee
Copy link
Contributor Author

jonathan-j-lee commented Aug 15, 2025

I tested this both locally in wpt:

./wpt run -y chrome infrastructure --metadata infrastructure/metadata --trace-categories=blink.bindings

... and in Chromium CI, for both chrome and headless_shell.

The CI failures are likely unrelated to the PR (#51981 and #54364).

@jonathan-j-lee jonathan-j-lee merged commit 6b05e1d into web-platform-tests:master Aug 19, 2025
31 of 34 checks passed
@jonathan-j-lee jonathan-j-lee deleted the wptrunner/chrome-tracing branch August 19, 2025 22:59
aarongable pushed a commit to chromium/chromium that referenced this pull request Aug 22, 2025
The option works like its `run_web_tests.py` counterpart, except the
categories are configurable and the trace is in JSON format. The trace
events are retrieved from an internal ChromeDriver buffer and written to
`layout-test-results/external/wpt/.../test-trace.json`, where they can
be downloaded from the results viewer.

See web-platform-tests/wpt#54366 for the
upstream change this CL depends on.

Bug: 434017035
Change-Id: I49195559e4fca6ce54da4428ec26f3fe528eb2bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6820247
Reviewed-by: James Scott <[email protected]>
Commit-Queue: Jonathan Lee <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1505149}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants