Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1dfcb0e870a6cb8cf0a3ec2790d72394242af13d
https://github.com/WebKit/WebKit/commit/1dfcb0e870a6cb8cf0a3ec2790d72394242af13d
Author: Carlos Alberto Lopez Perez <[email protected]>
Date: 2025-06-19 (Thu, 19 Jun 2025)
Changed paths:
M Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py
M Tools/Scripts/webkitpy/browserperfdash/browserperfdash_runner.py
A Tools/Scripts/webkitpy/browserperfdash/plans/browser_binary_size.py
M Tools/Scripts/webkitpy/port/gtk.py
M Tools/Scripts/webkitpy/port/wpe.py
M Tools/Scripts/webkitpy/port/wpe_unittest.py
Log Message:
-----------
[WPE] Measure browser binary size as part of the benchmark tests on the RPi
bots
https://bugs.webkit.org/show_bug.cgi?id=294625
Reviewed by Nikolas Zimmermann.
This patch implements a new benchmark plan named 'browser-binary-size' that can
be run with the script browserperfdash-benchmark and which will gather the size
in bytes of the browser and the relevant browser libraries and send those to
the dashboard. By relevant browser libraries we understand those that are not
provided by the system or the third-party libraries system (jhbuild/flatpak)
An example of the data that it sends in the case of WPE MiniBrowser is this
one:
Size:Total: 179MB
MiniBrowser:Size: 3.51MB
libWPEPlatform-2.0.so.0:Size: 3.62MB
libWPEWebKit-2.0.so.1:Size: 172MB
Note: it sends the data in bytes, above is the pretty-print version of it.
The idea is to run this 'browser-binary-size' report continously as part of
the battery of benchmark tests that we run on the build.webkit.org CI and
send this data to the browserperfdash dashboard to keep a track of this
sizes and be able to easily tell when the sizes changed.
In order to accomodate this new type of benchmark plan in the design of
browserperfdash a new type of plan plugins is created. Those plugins
consist on independent python files that register themselves with a
plugin-name string and a entry-point function that receive as parameters
the browser object (from run-benchmark) and the path to a temporal file
where it should write the data with the results in json format.
For now only one of this plugins is there: 'browser-binary-size', but
the design allows to easily ship more random plugin-plans in the future.
This new type of plan-plugins are meant to measure something in the browser
(like binary-size) but they don't need to execute the browser itself.
This contrasts with the existing run-benchmark plans, which are meant to
execute the browser on a specific webpage that runs some benchmarks within
the browser.
Also, a few related or needed features are implemented, like:
- Support on browserperfdash-benchmark for saving the json results sent to
the server in a local directory
- Support on browserperfdash-benchmark for reading and dumping to stdout the
parsed information from those saved json results
* Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults):
* Tools/Scripts/webkitpy/browserperfdash/browserperfdash_runner.py:
(parse_args):
(BrowserPerfDashRunner.__init__):
(BrowserPerfDashRunner._get_plan_version_hash):
(BrowserPerfDashRunner):
(BrowserPerfDashRunner._load_and_list_plan_plugins):
(BrowserPerfDashRunner._is_benchmark_runner_plan):
(BrowserPerfDashRunner.is_browserperfdash_runner_plan):
(BrowserPerfDashRunner.available_plans):
(BrowserPerfDashRunner._run_benchmark_runner_plan):
(BrowserPerfDashRunner._run_plan):
(BrowserPerfDashRunner._save_to_results_directory):
(BrowserPerfDashRunner.run):
(read_results_json):
(main):
(BrowserPerfDashRunner._get_test_version_string): Deleted.
* Tools/Scripts/webkitpy/browserperfdash/plans/browser_binary_size.py: Added.
(generate_json_for_benchmark):
(get_basenames_and_sizes):
(get_browser_relevant_objects_glib):
(run):
(register):
* Tools/Scripts/webkitpy/port/gtk.py:
(GtkPort.get_browser_path):
(GtkPort.run_minibrowser):
* Tools/Scripts/webkitpy/port/wpe.py:
(WPEPort.get_browser_path):
(WPEPort.run_minibrowser):
* Tools/Scripts/webkitpy/port/wpe_unittest.py:
(WPEPortTest.test_browser_cog_parameters_platform_override_via_environ):
(WPEPortTest):
(WPEPortTest.test_get_browser_path):
Canonical link: https://commits.webkit.org/296425@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes