perf_sweep
Records a program once per value of one variable and reports median FPS, GPU ms/frame, and stutter per value to compare GPU performance.
Instructions
Records the same program once per value of one variable (dim, example, api, size, or env:NAME for an environment
variable) and returns, per value, the median of FPS, 1 % low, GPU ms per frame and stutter, and with 3 or more
numeric values the straight line GPU ms per frame follows (fixed ms plus ms per draw for dim, per unit otherwise)
with its r2. With rounds above 1 the values run in opposite order every other round, so drift hits all alike.
Runs are named name--r; each takes its seconds plus about a minute to read back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api | No | with workload: mtl (native Metal), mtl-x64 (Metal built for x86_64, run under Rosetta like Wine), vk (Vulkan through MoltenVK: set METAL_TRACE_MOLTENVK), d3d11 or d3d12 (under wine) | |
| dim | No | with workload drawstress: side of the cube grid, dim^3 draws per frame | |
| env | No | NAME=VALUE pairs separated by spaces, set in the program's environment | |
| args | No | program arguments as in a shell, quotes included | |
| name | Yes | name for the runs: letters, digits, '.', '_', '-' | |
| size | No | with a workload that has size_variables (drawstress): the window size, WIDTHxHEIGHT such as 1920x1080 | |
| wine | No | Wine directory holding bin/wine, or native | |
| memory | No | default true; false skips the Metal memory table, the slowest to read (about 40 % faster summary): no metal_mib_peak | |
| prefix | No | Wine prefix, default WINEPREFIX or ~/.wine; ignored with native | |
| rounds | No | rounds, default 1, at most 5 and at most 24 recordings in all; every other round runs the values in reverse | |
| skip_s | No | seconds to leave out at the start of each recording, where shaders compile and resources load; 0 (default) keeps all. The GPU numbers, hitches and Metal memory are recomputed without them | |
| values | Yes | 2 to 8 values of the variable, such as [10, 20, 30] for dim | |
| example | No | with a workload that lists examples in workload_list: the one to run | |
| program | No | path of the .exe, or of the macOS binary with wine=native | |
| seconds | No | recording length, default 20; use 30 under Wine, whose start-up takes part of it; the export afterwards takes several minutes under Wine | |
| workdir | No | directory the program starts in, default the program's own | |
| counters | No | default false; true also records Metal GPU Counters (gpu_counters in the summary); not under Windows; adds about 40 s of read-back per recorded second | |
| variable | Yes | what changes between runs: dim, example, api, size, or env:NAME for an environment variable | |
| workload | No | a test program from workload_list, fetched with workload_fetch, instead of program | |
| background | No | macOS only, default false; true runs the program under taskpolicy -b, which throttles it hard and unevenly (drawstress: 18 to 280 times slower): repeat the run | |
| memory_free_pct | No | macOS only, 20 to 60: holds the whole Mac at this percentage of RAM free while recording (memory_pressure), to see how the program behaves short of memory; lower can freeze the Mac |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||