Skip to content

CI: Use mitmproxy in OHOS Ci#41885

Merged
yezhizhen merged 7 commits intoservo:mainfrom
Narfinger:mitmproxy-test
Feb 4, 2026
Merged

CI: Use mitmproxy in OHOS Ci#41885
yezhizhen merged 7 commits intoservo:mainfrom
Narfinger:mitmproxy-test

Conversation

@Narfinger
Copy link
Copy Markdown
Contributor

@Narfinger Narfinger commented Jan 13, 2026

This has a couple of changes to use mitmproxy (see more https://book.servo.org/contributing/profiling.html?highlight=mitmproxy#webpage-snapshots) in the ohos benchmarking CI.

  • We include an easy script to create a mitmproxy dump (etc/ci/scenario/update-mitmproxy-dump.py).
  • We set the port forwarding in the common_function_for_servo_test (with a refactor of the code).
  • We added the use of mitmproxy to scenario test and bencher runs. This currently runs in strictly forwarding mode. But because we skip the wifi connection and use a wired connection, this should defeat jitter a bit.
  • This does not include the smoketest and hitrace-bench.

Signed-off-by: Narfinger [email protected]

Testing: https://github.com/Narfinger/servo/actions/runs/21630846381/job/62343433828

In the future we will add smoketest and hitrace-bench to use mitmproxy and finally switch mitmproxy to record and replay mode.

@Narfinger Narfinger force-pushed the mitmproxy-test branch 2 times, most recently from 2935e5b to 9a0e9b2 Compare January 13, 2026 15:31
@Narfinger Narfinger force-pushed the mitmproxy-test branch 5 times, most recently from 132eb79 to 190d1b4 Compare January 20, 2026 13:19
@Narfinger
Copy link
Copy Markdown
Contributor Author

@jschwe Updated it.

@Narfinger

This comment was marked as resolved.

@Narfinger Narfinger marked this pull request as ready for review January 22, 2026 15:13
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 22, 2026
Copy link
Copy Markdown
Member

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all action run links you provided, I did not see any output like before in scenario tests, and all finish in 1 sec:

Image

Here is a sample before your PR:
https://github.com/servo/servo/actions/runs/21271461325/job/61222532498

@servo-highfive servo-highfive added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jan 23, 2026
@Narfinger Narfinger marked this pull request as draft January 23, 2026 10:22
@Narfinger

This comment was marked as outdated.

@Narfinger Narfinger marked this pull request as ready for review January 28, 2026 13:07
@servo-highfive servo-highfive removed the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Jan 28, 2026
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 4, 2026
Signed-off-by: Narfinger <[email protected]>
Signed-off-by: Narfinger <[email protected]>
Signed-off-by: Narfinger <[email protected]>
@Narfinger
Copy link
Copy Markdown
Contributor Author

I would have assumed that too but I don't know why.

@jschwe jschwe added this pull request to the merge queue Feb 4, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 4, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 4, 2026
This has a couple of changes to use mitmproxy in the ohos benchmarking
CI.

- We include an easy script to create a mitmproxy dump
(etc/ci/scenario/update-mitmproxy-dump.py).
- We set the port forwarding in the common_function_for_servo_test (with
a refactor of the code).
- We added the use of mitmproxy to scenario test and bencher runs. This
currently runs in strictly forwarding mode. But because we skip the wifi
connection and use a wired connection, this should defeat jitter a bit.
- This does _not_ include the smoketest and hitrace-bench.

Signed-off-by: Narfinger <[email protected]>

Testing:
https://github.com/Narfinger/servo/actions/runs/21630846381/job/62343433828

In the future we will add smoketest and hitrace-bench to use mitmproxy
and finally switch mitmproxy to record and replay mode.

---------

Signed-off-by: Narfinger <[email protected]>
@yezhizhen
Copy link
Copy Markdown
Member

yezhizhen commented Feb 4, 2026

We include an easy script to create a mitmproxy dump (etc/ci/scenario/update-mitmproxy-dump.py).

How to use this? Can you write a guide? Also explain a bit how the dump works.

Maybe also some URL to introduce mitmproxy too. Thanks!

@yezhizhen yezhizhen removed this pull request from the merge queue due to a manual request Feb 4, 2026
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 4, 2026
@Narfinger
Copy link
Copy Markdown
Contributor Author

Do you have a good idea where to write this? There is already a guide on mitmproxy in the servo book.

@yezhizhen
Copy link
Copy Markdown
Member

Do you have a good idea where to write this? There is already a guide on mitmproxy in the servo book.

Ah nice. Can you put in PR description at least? I think you are talking about https://book.servo.org/contributing/profiling.html?highlight=mitmproxy#webpage-snapshots

Also, maybe write at the top of etc/ci/scenario/update-mitmproxy-dump.py how to use it?

Signed-off-by: Narfinger <[email protected]>
Signed-off-by: Narfinger <[email protected]>
Copy link
Copy Markdown
Member

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Feb 4, 2026
Co-authored-by: Euclid Ye <[email protected]>
Signed-off-by: Narfinger <[email protected]>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Feb 4, 2026
@yezhizhen
Copy link
Copy Markdown
Member

@Narfinger ./mach fmt

@yezhizhen yezhizhen enabled auto-merge February 4, 2026 12:43
Signed-off-by: Narfinger <[email protected]>
@yezhizhen yezhizhen added this pull request to the merge queue Feb 4, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 4, 2026
Merged via the queue into servo:main with commit 1abe258 Feb 4, 2026
29 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Feb 4, 2026
@Narfinger Narfinger deleted the mitmproxy-test branch February 4, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants