You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Kotlin script for running benchmarks for all targets (#5566)
The `run_benchmarks.main.kts` script provides running benchmarks on all
supported platforms (macos, desktop, web, ios). It handles
platform-specific details like starting a background server for web
benchmarks or invoking iOS-specific scripts.
Also it handles running benchmarks in a separate process.
`compare_benchmarks.main.kts` and `find_degradations.main.kts` was also
updated to use the script.
Fixes [CMP-8273](https://youtrack.jetbrains.com/issue/CMP-8273)
## Release Notes
N/A
There are several scripts provided to run benchmarks more conveniently, especially when you need to run multiple iterations or compare different versions.
49
+
50
+
### `run_benchmarks.main.kts`
51
+
52
+
This script is the main entry point for running benchmarks on all supported platforms (macos, desktop, web, ios). It handles platform-specific details like starting a background server for web benchmarks or invoking iOS-specific scripts.
53
+
54
+
**Usage:**
55
+
```bash
56
+
./run_benchmarks.main.kts <platform> [runs=1] [benchmarks=<benchmarkName>] [version=<version>] [separateProcess=true|false] [any other gradle args]
57
+
```
58
+
59
+
**Platforms:**`macos`, `desktop`, `web`, `ios`
60
+
61
+
**Arguments:**
62
+
-`runs=<number>`: Number of iterations to run (default: 1).
63
+
-`benchmarks=<name1,name2,...>`: Filter benchmarks to run.
64
+
-`version=<version>`: Compose Multiplatform version to use. If specified, the script updates `gradle/libs.versions.toml` before running and restores it afterward.
65
+
-`separateProcess=true`: Runs each benchmark in a separate process for better isolation (default: `false`).
66
+
- Any other arguments (e.g., `modes=SIMPLE`) are forwarded to the benchmark execution.
Performs a binary search over a list of versions to find the first version where a performance degradation (defined as >5% increase in time) was introduced.
0 commit comments