perf_baseline_record
Records the same program multiple times to build a named baseline for perf_check and returns the range each measured number spans across runs.
Instructions
Records the same program count times in a row with perf_record's arguments and saves the runs as the
reference name for perf_check, returning the range each number spans across them. Runs are named
name-1, name-2, ... Each recording takes its seconds plus about a minute to read back. skip_s as in
perf_baseline: the reference leaves out each run's start-up.
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 | reference name: 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 | |
| count | No | equal recordings to make, default 3 | |
| 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 | |
| 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; perf_check applies the same cut to the run it judges | |
| 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 | |
| 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 | |||