PSA: you can now generate chrome traces for web_tests on CQ bots

45 views
Skip to first unread message

Stefan Zager

unread,
Nov 15, 2023, 8:50:06 PM11/15/23
to blink-dev
tl;dr -- see subject line

Sometimes web_tests fail on the CQ bots but not when running locally, and when that happens it's very difficult to debug. To make it a bit easier, you can now generate chrome traces for web_tests and wpt_tests running on the CQ bots and download the resulting trace files.

1. Create a CL with (or add to an existing CL) a diff like this, listing the tests you want to profile.

2. Upload the CL and trigger try jobs.

3. On the build result page, expand the "archive results for ..." step and click on the web_test_results_link:

image.png

4. On the web_test_results page, expand the entry for the test case; you should see a "trace" link; click on it to download the trace file:

image.png
5. Profit!


Q: How is this different from the pre-existing --enable-tracing flag?
A: The results of --enable-tracing were not previously archived with web_test_results.
A: --enable-tracing can't be specified on a per-test-case basis, and enabling it for all web_tests would destroy the bot.
A: --enable-tracing forces a content_shell restart after every test case. That makes the tests extremely slow, and it also suppresses any errors caused by running tests serially in a single content_shell (the default behavior, and historically a significant source of bugs).

Q: What trace categories are enabled?
A: "*", i.e., all the basic non-huge ones.

Q: Is this documented anywhere else?
A: I'm working on adding it to the docs
Reply all
Reply to author
Forward
0 new messages