KPI maintainer guide#
KPI measures how a validated ovclash Release build performs on nine frozen workloads. It records operation time, pipeline time (the time of the query’s pipeline steps), memory and saved-result size; KPI workloads and metrics defines each. It compares these values with the approved budgets for the CPU model that ran them. It also checks that each workload did its frozen benchmark work. The glossary defines workload, budget and the other KPI terms that these pages use.
KPI does not test correctness. Sentinel owns product correctness and runs as a separate, blocking gate. A KPI work check proves only that the expected pairs, samples, elements, duplicates and output volume were produced.
KPI runs from the ovclash/ directory of a source checkout or a complete
source export. It is not part of the installed
SDK archive or wheel. It runs on Windows x86-64, Linux
x86-64 and Linux AArch64. It measures either the ovstage product backend or the unpublished
OpenUSD reference backend; the consumer glossary defines
backend, ovstage and OpenUSD. Both backends run the same stages, settings and sample grids, and
each backend has its own budgets. Git is optional: a source export uses the same content
fingerprint as a checkout (see
build provenance).
Pages in this guide#
Page |
What it covers |
|---|---|
This page |
Quick start, how check mode, baseline collection and offline budget recording work, the glossary, outputs and row caps |
The nine workloads and their query settings, expected counts and saved stage sizes, timing boundaries, required metrics and memory scope |
|
Launchers, automatic and explicit input preparation, source identity, every option and environment variable, startup console output, running KPI in another CI system, the controller without the launchers, observer overhead diagnostics and troubleshooting |
|
The |
|
Admission policy and CPU domain, recorded contention, four-core placement, the shared CPU-wait allowance, recovery, deadlines, the cohort, strict admission, the Windows accounting model and judging ranges |
|
Baseline rules, runner and storage labels, |
|
Exit codes, console progress, the final summary, the public record, calibration evidence, and the private execution tree with its summary encoding |
|
Contract files, preparation and expected-work identity, Linux AArch64 expectation files, pin refresh, supported workflows and validation receipts, measurement identity, tests and goldens, the source map and static-analysis annotations |
|
Generating, inspecting and sealing the three fixture bundles |
Quick start#
Before you begin, the checkout must build a Release SDK archive; see building ovclash from a source checkout. A check or a collection also needs at least four usable physical cores; with fewer, a check exits 76 (see exit 76) and a collection exits 3.
Run every command from ovclash/. Use bash ./run_kpi.sh on Linux x86-64 and AArch64, and
run_kpi.bat on Windows. In the Python commands of the KPI guides, $PY (%PY% in cmd.exe)
is the KPI input Python that the launchers use, the packaged CPython 3.12 of the
portable input bundle. For the ovstage inputs:
Linux:
PY=_build/portable-inputs/ovstage/Release/python-runtime/bin/python3
Windows (cmd.exe):
set "PY=_build\portable-inputs\ovstage\Release\python-runtime\python.exe"
For OpenUSD, replace ovstage with openusd. Preparation verifies the frozen bundle bytes
only with this interpreter. $PY is not the Python test venv (_build/deps/venv/python_tests),
which KPI frozen contracts and maintenance and the
testing guide call $TEST_PY. The path
exists once 1. Prepare Release inputs has staged the bundle; then
"$PY" --version ("%PY%" --version in cmd.exe) prints Python 3.12. and a patch number.
The quick start sets or reads these variables:
Variable |
Values |
Required |
Default |
Effect |
|---|---|---|---|---|
|
The Python of the portable input bundle: |
Yes, for the |
None; set it in your shell |
Runs the |
|
|
No |
Unset: the validation receipt records the ref protection as unknown ( |
Recorded in the validation receipt. |
1. Prepare Release inputs#
KPI measures only a validated Release build. Release validation packages the SDK archive and
the wheel into _build/dist/<backend>. --stage-inputs then copies the validated installed SDK
(the install tree, the content of the SDK archive), its Python runtime and the Sentinel helpers,
Sentinel’s native helper executables, into
_build/portable-inputs/<backend>/Release; it compiles nothing. See
prepare inputs explicitly.
Windows (cmd.exe):
set "OVCLASH_CI_REF_PROTECTED=false"
build_ovstage.bat --release --validate --stage-inputs
set "OVCLASH_CI_REF_PROTECTED="
Linux x86-64 and AArch64:
bash ./build_ovstage.sh --release --validate --stage-inputs
Local Windows validation usually skips Authenticode signing; see
code signing.
OVCLASH_CI_REF_PROTECTED=false records the unprotected development ref in the validation
receipt, which KPI preparation requires before it accepts that ovstage skip. An OpenUSD skip
does not depend on the ref; see supported workflows.
The command exits 0 after it prints Staged portable inputs: <path>, where <path> is the
staged bundle. A nonzero exit means that the build, the validation or the staging failed, and a
staging failure prints Staging portable inputs failed (exit code <n>).
Validation output shows which validation step
failed, and troubleshooting lists the KPI input errors.
For OpenUSD, use build_openusd and pass --backend openusd to the launcher. This step is
optional: when the default inputs are missing, invalid or not built from the checked-out
source, the launcher runs a Release validation with --stage-inputs once before it measures.
See automatic preparation. Explicit --inputs or
--dist turn this off; see caller-managed inputs.
2. Run a check#
Windows:
run_kpi.bat --profile release --output _build/kpi-local-example
Linux x86-64 and AArch64:
bash ./run_kpi.sh --profile release --output _build/kpi-local-example
--mode check is the default. With the default inputs, the launcher’s startup check first
prints KPI startup: lines, ending with
KPI startup: matching validated Release inputs are ready; reusing them. when no preparation
is needed. The driver then prints the settings it will use, grouped by where each value came
from. For the Linux command of 2. Run a check, the block reads:
KPI settings by source:
Arguments:
Profile --profile | release
Output --output | ovclash/_build/kpi-local-example
Launcher defaults:
Backend | ovstage
Platform | linux
Inputs | ovclash/_build/portable-inputs/ovstage/Release
Distribution | ovclash/_build/dist/ovstage
Defaults:
Mode | check
Public output | ovclash/_build/kpi-local-example/public
Calibration output | ovclash/_build/kpi-local-example/calibration
Baselines | ovclash/benchmarks/kpi/baselines/ovstage/linux
Admission policy | shared-runner-recorded-contention-v2
CPU domain | four-physical-cores-retry-v2
Runner class | local-review
Storage class | unclassified-local-disk
Fixed:
Configuration | Release
Workloads | all 9 representative workloads
Runs per workload | 1 warm-up + 3 to 9 measured, until stable
CPU retries | 10 per run
Noise limits | Load 25%; all other metrics 15%
CPU wait allowance | 180 seconds per campaign
Campaign deadline | none; each operation keeps its own deadline
KPI MODE: VALIDATION (--mode check)
Platform: linux | Backend: ovstage | Profile: release
Require compatible baseline coverage before fixture generation; then measure and compare.
Settings block explains every row, and mode and lookup lines the lines that follow it.
3. Read the result#
After Release preparation, check mode looks for budgets that cover this backend, platform and
CPU model; see how check mode matches a package.
The catalogs under benchmarks/kpi/baselines/ cover only the CPU models their packages were
collected on, and a public source checkout ships them empty; benchmarks/kpi/baselines/README.md
describes them. When no package covers this
CPU model, runner class and storage class, the run stops before it generates the bundles, and
prints lines like these (CPU model values and counts are illustrative):
Baseline lookup | Backend: ovstage | Platform: linux
Baseline source: default | Catalog: ovclash/benchmarks/kpi/baselines/ovstage/linux
CPU model: name=Example Core 42, vendor=GenuineIntel, family=6, model=42, stepping=1 | id 33405c7bf70eb576432b1ed27db64309e5d6e1941762af7b65b0d1b6dac9330a | architecture x86_64 | core class linux-topology-core-type 0 | SMT width 2
Selected CPU model: none
Baseline entries read: 2 packages / 94 metric limits | Required cells per CPU model: 47
Baseline lookup: loaded limits are incompatible or incomplete for the observed CPU and workload contract
Missing CPU-model workload/metric cells: 47
Missing: CPU model 33405c7bf70e | benchmark-body-representative-static / operation_seconds
Missing: CPU model 33405c7bf70e | benchmark-body-representative-static / load_seconds
...
Missing: CPU model 33405c7bf70e | benchmark-body-representative-duplicates-only / resident_high_water_bytes
KPI WARNING: exit 3 (insufficient evidence); no fixture generation and no measurements executed.
Linux needs 47 covered cells per CPU model and Windows 56, because Windows adds the
private_high_water_bytes metric. The run exits 3 (insufficient evidence), still writes the
public record public/measurements.json and prints the final summary
from it. Mode and lookup lines lists every other
lookup decision.
With complete coverage, the run continues through the phases of check mode. A
run that passes ends with
All KPI workloads passed and stay within their approved limits. Everything is awesome!.
Reports and verdicts lists every exit code.
4. Collect a baseline#
Before you begin: commit your changes, because a collection measures only a build of committed source and rejects any other. Use a machine that you can leave to the collection for the whole allowance, with at least four usable physical cores. Preparing the inputs is optional here too: the launcher prepares missing or stale default inputs first.
A collection ignores existing budgets and derives new ones from --baseline-campaigns N full
Release campaigns per CPU model (default and minimum 3); see
baseline collection.
Windows:
run_kpi.bat --mode collect-baseline --baseline-campaigns 3 --backend ovstage --collection-seconds 13800 --output _build/kpi-baseline-01
Linux x86-64 and AArch64:
bash ./run_kpi.sh --mode collect-baseline --baseline-campaigns 3 --backend ovstage --collection-seconds 13800 --output _build/kpi-baseline-01
--collection-seconds is the allowance for the whole collection; without it, the allowance is
3,000 seconds. The progress log is public/progress.log and the result is public/status.json.
On success, the command exits 0 and the console prints Baseline written: <path> for each
generated package under public/baseline/baselines/. Any other exit code means that no
baseline was published: the reason in public/status.json names the cause, and
collection status and exit codes explains
each reason and what to do. See collect a baseline.
A local collection records the runner class local-review and the storage class
unclassified-local-disk, so its packages cover only checks with the same labels; see
runner and storage labels.
5. Review the baseline#
Before you begin: the collection of 4. Collect a baseline exited 0,
and $PY is set as in the quick start. The commands of this step and of
6. Install the baseline use that collection’s
_build/kpi-baseline-01 output and its ovstage packages; for another output, backend or
platform, replace _build/kpi-baseline-01, ovstage and linux (or windows, aarch64) in
both paths.
Review the complete generated series. Linux:
"$PY" -B -m benchmarks.kpi baseline-series review --input _build/kpi-baseline-01/public/baseline
Windows (cmd.exe):
"%PY%" -B -m benchmarks.kpi baseline-series review --input _build\kpi-baseline-01\public\baseline
A passing review prints the series’ review text, the same text as its review.txt, and exits
0. A series that fails the replay prints
kpi baseline-series: retained evidence validation failed and exits 4; do not install its
packages.
6. Install the baseline#
Before you begin: the review of 5. Review the baseline exited 0.
Copy the packages into the catalog. Linux:
cp _build/kpi-baseline-01/public/baseline/baselines/ovstage/linux/*.kpi-budget.json benchmarks/kpi/baselines/ovstage/linux/
Windows (cmd.exe):
copy _build\kpi-baseline-01\public\baseline\baselines\ovstage\windows\*.kpi-budget.json benchmarks\kpi\baselines\ovstage\windows\
Remove any older package for the same CPU model, and commit the new packages in the same change.
A check on the same machine then prints
Baseline lookup: coverage found; performance comparison is pending.
Review and install a generated series
gives the full procedure.
How a KPI run works#
KPI has two modes, check (the default) and collect-baseline, and a manual, offline way to
create budgets. Both modes measure the same nine workloads under one of two profiles. smoke,
the default of the launchers and of python -m benchmarks.kpi run, takes one observation per
workload and can expand to three when compatible approved budgets apply. release takes one
warm-up and then 3 to 9 measured runs until every required metric passes its noise limit.
Profiles compares them.
Check mode#
run_kpi.bat, run_kpi.sh and every CI check job run the same driver, scripts/kpi_ci.py
(see launchers). In check mode it runs these phases:
parse options invalid options: exit 4; the launcher's startup check or the
driver rejects them
print the settings block console only
resolve admission invalid policy or domain: exit 4; then print the mode lines
check output freshness existing public or calibration output, or outputs that overlap
the inputs or the private execution tree: exit 4
preparation extract the wheel, bind the SDK, wheel, runtime and the one
passing validation receipt of this build
budget read the catalog or package, observe the CPU models, check
coverage; no complete coverage: exit 3, no bundles, no workload;
fewer than four usable physical cores: exit 76
generation generate the three fixture bundles once and check their pins
campaign measure the nine workloads; check the frozen work; compare
every required metric with its budget
calibration export release profile only, after a clean campaign with benchmark
verdict 0 or 3 in which every workload became stable
cleanup and publication remove the private execution tree after a verified drain;
write public/measurements.json; print the final summary,
unless --summary-mode deferred leaves it to a later step
Reports and verdicts gives every exit code, including
exit 76, and
console progress the lines each phase prints. The
CPU admission page describes how each attempt is placed and admitted,
and KPI sampling how many runs each workload takes. The standalone
python -m benchmarks.kpi run has no coverage step; see
run a campaign.
Baseline collection#
--mode collect-baseline hands the run to scripts/kpi_collect.py, which prepares the Release
build and the bundles once and then runs full Release campaigns on the same machine until every
observed and required CPU model has a qualifying set of N campaigns, or until a stop such as
the end of the allowance. Only a complete collection writes public/baseline/;
how a collection runs gives the phases, the selection
and every stop condition.
Offline budget recording#
budget create is the manual alternative to a collection: it verifies calibration evidence
that you collected yourself offline, prints one review table, asks for local approval and
writes one sealed .kpi-budget.json package.
Offline budget recording gives the accepted
inputs, the pooling rules, the collection plan and the approval answers.
Glossary#
The KPI pages use one name for each of these concepts. Consumer terms such as backend, query, stage and Suite API keep their consumer meaning.
Term |
Meaning |
|---|---|
Workload |
One of the nine frozen measured units, such as |
Base workload |
One of the six static, dynamic and Suite-save workloads of Body and Cockpit. The depth, clearance and duplicates-only workloads each change one setting of a base workload |
Expected work |
The frozen work that a workload must produce: its pair, record, element and duplicate counts and hashes, its mesh statistics and its report or BLOB volume. Only the reviewed contract files supply it; see expected-work identity |
Bundle |
One of the three generated fixture bundles, |
Stage |
The USD stage of a bundle, its |
Portable input bundle |
The staged inputs that a run measures, |
Validation receipt |
|
Driver |
|
Collector |
|
Controller |
|
Child |
The owned process of one attempt that runs the workload’s operation. A child that reports a pass cannot qualify a result by itself |
Observer |
The in-process sampler of the child. It reads OS memory and CPU counters during the operation, and its own cost is part of the measured process |
Result-ready |
The boundary at which an operation’s results are usable. The operation timer and the memory high-water values stop there; see timing boundaries |
Campaign |
One controller run over all nine workloads, in one fresh private execution tree |
Collection |
A baseline collection, a |
Profile |
|
Run |
One successful measurement slot of a workload. Release allows ten runs per series, including the warm-up; see run, retry and attempt limits |
Attempt |
One recorded attempt of a workload. Most attempts launch one child. When CPU admission rejects an attempt, the run makes another attempt, a retry. A rejected four-core placement, a shared CPU-wait allowance stop and a cleanup-reserve stop are attempts that the controller records without launching a child. The console’s |
Warm-up |
The first successful run of a Release series. It is retained but excluded from medians, noise and budgets; see warm-up |
Series |
The runs of one workload in a campaign. A workload restart starts a new series with a new warm-up |
Observation |
One qualified value of one metric from one attempt |
Required metric |
A metric that the noise gate and the budgets cover; see required metrics |
Noise |
Stability noise |
Noise gate |
The check that the noise of every required metric stays within its noise limit, 25% for Load ( |
Budget |
The warning limit and the failure limit of one workload and required metric for one CPU model; see budget limits. The pages never call a budget “limits”; only console lines do |
Package |
One sealed |
Baseline |
The output of a complete collection: the generated series and packages under |
Catalog |
The directory |
Runner class, storage class |
The closed-list labels of the machine and of its disk that every cohort records. A package covers only runs with the same pair; see runner and storage labels |
Admission policy, CPU domain |
The policy ( |
Shared CPU-wait allowance |
The 180 seconds of extra CPU waiting that placement and child admission share in one four-core campaign; see shared CPU-wait allowance |
Campaign deadline |
The time by which the controller must end a campaign: |
Cleanup reserve |
The last 300 seconds before the campaign deadline, in which no attempt starts. Console lines and reason codes call it the job reserve |
Coverage cell |
One CPU model, workload and required metric. Check mode needs every cell of one observed CPU model covered |
Inventory cell |
One requested workload repetition in a campaign’s |
CPU model |
The observed processor identity, core class and SMT width of a four-core pool, keyed together with the CPU domain, platform and architecture |
Core class |
The core type that the OS reports for a CPU, the Linux topology core type or the Windows efficiency class. It tells apart the core kinds of a hybrid CPU |
SMT width |
The number of logical CPUs per physical core under simultaneous multithreading (SMT); the other logical CPUs of a core are its SMT siblings |
Model key |
A CPU model’s canonical key ( |
Model ID |
The SHA-256 of a model key. Generated packages use it as file name |
Pool |
The physical cores of one processor identity, core class, package, NUMA (non-uniform memory access) node and SMT width; see placement |
Selection ledger |
|
Cohort |
Everything that must match for observations to pool or to use a package; cohort lists its members |
Lane |
One platform and backend, such as |
Calibration evidence |
|
Public record |
|
Private execution tree |
The raw campaign files. They stay on the machine and are deleted after a verified drain; see private execution tree. The KPI pages use no other name for it |
Scorecard |
The workload-consistency summary in the private |
Verified drain |
The controller’s confirmation that every owned child process and writer of a campaign has exited. Only then does the driver remove the private execution tree, and only a campaign with a verified drain exports calibration evidence |
Source export |
A copy of the source tree without Git metadata, such as a public source release. It uses the same content fingerprint as a checkout |
Golden |
A reviewed expected-output file that a KPI test compares byte for byte, such as |
Outputs#
A launcher run writes into one output container, --output. The defaults are _build/kpi for
ovstage and _build/kpi-openusd for OpenUSD.
Path |
Format |
Present |
Content |
|---|---|---|---|
|
JSON; see public record |
Check mode, from the moment the output checks pass. It starts as an incomplete context-only record and is replaced as the run progresses |
The public record in the |
|
JSON; see calibration evidence |
Check mode with |
Calibration evidence of the campaign |
|
UTF-8 text |
Collection mode, once the configuration step passed |
Progress of a collection; see collection progress log |
|
JSON |
Collection mode, from the start of preparation |
Result of a collection; see collection status and exit codes |
|
Directories with |
Collection mode, per campaign; |
The public record of each collection campaign and its calibration evidence. That calibration stays even when the independent replay rejects the campaign |
|
Directory |
Only after a complete collection |
The generated series and packages; see collection outputs |
--public-output and --calibration-output select other locations. The private execution
tree lives below the output container on Linux and in the system temporary directory on
Windows. It is removed after a verified drain and never exported; see
private execution tree.
The public record alone cannot establish a baseline. A --profile release check run also
exports separate runtime-free calibration evidence, but only when compatible coverage permitted
measurement, the campaign ended with benchmark verdict 0 or 3 after a verified drain, and every
workload became stable; see calibration evidence. Pass
that calibration directory, or the per-campaign public/campaigns/<NNNN>/calibration
directories of a collection, to budget create --artifacts. Interrupted, failed or incomplete
campaigns never export partial calibration.
Output directories must be fresh. The public and calibration directories must not exist
before a run, and existing records are never overwritten. A collection assembles
public/baseline/ in a hidden staging directory beside the public output. It holds an OS lock
on that staging while it writes the series, releases the lock, and then publishes
public/baseline/ in one rename that never replaces an existing directory. A second run that
names the same output stops without replacing its files. After a crash, you can retry the same
destination while it is still absent.
Hidden .kpi-generated-* and ..kpi-generated-* entries can remain beside the public output.
They are staging directories and the ..kpi-generated-*.controller.lock file. An abrupt exit
leaves them, and so does a staging directory or lock file that cannot be deleted. They can
remain whatever reason the collection reports, and they do not mean that a process still owns
the lock. Delete them by hand.
Row caps#
Readers bound row counts as limits against hostile input. These limits never end a legitimate collection:
Every executed attempt contains at least one complete one-second CPU window. A 13,800-second collection therefore holds at most 13,800 executed attempts.
At most 27 never-started cells are added: three for a just-restarted series and three for each of eight later workloads.
The restart limit also bounds a nine-workload campaign: 9 workloads x 11 series x 110 attempts gives 10,890 executed attempts and 10,917 rows. A longer
--collection-secondscannot exceed the cap.
Record |
Row limit |
Byte limit |
|---|---|---|
Public |
16,384 (2^14) rows each for inventory cells, attempts, comparisons and sampling rows |
2 MiB |
Console progress stream |
Series numbers in attempt IDs, and the retry counts and limits in |
None |
|
110 attempt rows per workload (990 for nine workloads) and 8,192 CPU placement receipts |
64 MiB |