WebKit icon indicating copy to clipboard operation
WebKit copied to clipboard

Add macOS minibrowser support to 'run-benchmark'

Open lukewarlow opened this issue 1 year ago โ€ข 11 comments

18164cb581d24c8512875f75cefb3250c9f418c3

Add macOS minibrowser support to 'run-benchmark'
https://bugs.webkit.org/show_bug.cgi?id=275617

Reviewed by NOBODY (OOPS!).

Adds a new osx_minibrwser_driver.py to 'run-benchmark' command.

* Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_minibrowser_driver.py: Added.
(OSXMiniBrowserDriver):
(OSXMiniBrowserDriver.launch_args_with_url):
(OSXMiniBrowserDriver.launch_url):
(OSXMiniBrowserDriver.launch_driver):
(OSXMiniBrowserDriver.set_binary_location_impl):

https://github.com/WebKit/WebKit/commit/18164cb581d24c8512875f75cefb3250c9f418c3

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
โœ… ๐Ÿงช style โœ… ๐Ÿ›  ios โœ… ๐Ÿ›  mac โœ… ๐Ÿ›  wpe โœ… ๐Ÿ›  wincairo
โœ… ๐Ÿงช bindings โœ… ๐Ÿ›  ios-sim โœ… ๐Ÿ›  mac-AS-debug โœ… ๐Ÿงช wpe-wk2 โœ… ๐Ÿงช wincairo-tests
โœ… ๐Ÿงช webkitperl โœ… ๐Ÿงช ios-wk2 โœ… ๐Ÿงช api-mac โœ… ๐Ÿงช api-wpe
โœ… ๐Ÿงช webkitpy โœ… ๐Ÿงช ios-wk2-wpt โœ… ๐Ÿงช mac-wk1 โœ… ๐Ÿ›  wpe-cairo
โœ… ๐Ÿงช api-ios โœ… ๐Ÿงช mac-wk2 โœ… ๐Ÿ›  gtk
โœ… ๐Ÿ›  vision โœ… ๐Ÿงช mac-AS-debug-wk2 โœ… ๐Ÿงช gtk-wk2
โœ… ๐Ÿ›  vision-sim โœ… ๐Ÿงช mac-wk2-stress โœ… ๐Ÿงช api-gtk
โœ… ๐Ÿงช vision-wk2
โœ… ๐Ÿ›  tv
โœ… ๐Ÿ›  tv-sim
โœ… ๐Ÿ›  watch
โœ… ๐Ÿ›  watch-sim

lukewarlow avatar Jun 18 '24 16:06 lukewarlow

Assuming the name is not something that is required, I would avoid "osx" and use "macOS" instead (as macOS is no longer called that).

weinig avatar Jun 19 '24 00:06 weinig

The name is required to be osx as far as I know. The script lets you pick an os (Linux or osx) and then a browser and the valid browser is based on the OS prefix. So if I did macOS I'd have to update the tooling. I agree it should all be renamed but it's not something for this PR imo.

lukewarlow avatar Jun 19 '24 09:06 lukewarlow

What is the motivation for this? I know that this has been brought up before as "measure WebKit performance without overhead from Safari features", but the interactions are much more complicated than "overhead", so we haven't figured out what we'd do with such data points.

aproskuryakov avatar Jun 20 '24 00:06 aproskuryakov

@aproskuryakov Safari for WebKit development is frequently broken, and it is also nice to get this data on linux

justinmichaud avatar Jun 20 '24 12:06 justinmichaud

I think that SafariForWebKitDevelopment is sometimes broken without SIP, which is unfortunate but not a blocker. I don't see why other breakage shouldn't be fixed when running into it โ€“ seems better than getting misleading performance numbers.

it is also nice to get this data on linux

This PR is about macOS though?

aproskuryakov avatar Jun 20 '24 16:06 aproskuryakov

seems better than getting misleading performance numbers.

Can I ask why they'd be misleading? You'd only be able to compare to other minibrowser numbers (with the same build parameters such as debug vs release) but the numbers would still be comparable across equivalent builds right?

lukewarlow avatar Jun 24 '24 11:06 lukewarlow

~~I think I've managed to get it working with safari locally~~ so for now I'll close this. Though I still personally think it would be a useful addition

Edit: seems like it's still just using system safari.

lukewarlow avatar Jun 24 '24 12:06 lukewarlow

Can I ask why they'd be misleading? You'd only be able to compare to other minibrowser numbers (with the same build parameters such as debug vs release) but the numbers would still be comparable across equivalent builds right?

I don't think that we can even always expect movement in the same direction - a MiniBrowser progression could be a Safari regression, and vice versa. Given that MiniBrowser itself is not a target for optimization, this makes the numbers fairly useless, unless there's a scenario that I'm not thinking of.

aproskuryakov avatar Jun 24 '24 15:06 aproskuryakov

While Minibrowser may not be an optimization target for Apple, being able to get performance numbers at-desk is important if we want to avoid needing a round-trip with Apple engineers. This way, we can only ask for perf tasks for things that we are already somewhat confident aren't regressions.

Since folks outside Apple don't have any of the internal bits or PGO profiles, no performance results under say, 7%, could ever be useful to Apple anyway. MiniBrowser results still seem more useful than linux results, for example.

justinmichaud avatar Jun 24 '24 17:06 justinmichaud

I think that this discussion is really dependent on "SafariForWebKitDevelopment isn't working for us", and it would be preferable to figure that out if we can?

aproskuryakov avatar Jun 24 '24 17:06 aproskuryakov