Representative fixture stages#

KPI measures three generated bundles: body-representative, cockpit-representative and body-representative-depth, a full-motion Body bundle that only the Dynamic depth workload uses. Each bundle is a directory that holds one USD stage, its root.usda and layer files, and the bundle.json manifest. The KPI glossary defines bundle, stage, workload and the other KPI terms used here. The source-only benchmarks.kpi.reference_fixtures package generates the first two bundles from fixed recipes; benchmarks/kpi/reference_fixtures/profiles.py defines their size tiers. benchmarks/kpi/representative_depth.py generates the depth bundle from the body-representative recipe.

Generation, inspection and the structural census use only the Python standard library. They need no stage assets, OpenUSD Python bindings (pxr), renderer, sample application or network access. measure is the exception: it needs a configured ovstage runtime, the ovstage backend of the ovclash Python package.

This page covers the bundles. KPI workloads and metrics lists the nine workloads, their settings, counts and saved sizes, and KPI frozen contracts and maintenance owns the pins. Sentinel owns product correctness.

Generate and retain stages#

KPI preparation generates all three bundles before measurement, stops when one differs from its pin, and reuses them for every workload. A check generates them once, after its budget coverage check passes; a check without compatible coverage stops before generation. A baseline collection generates them once per collection, before its first campaign, and reads no installed budgets. The launchers and CI run both through the KPI driver; see how a KPI run works.

Note Generate the bundles with the KPI input Python, the packaged CPython 3.12. The pins match only the bytes it writes: other interpreter versions can print different digits for a few floating-point values. Python 3.14, for example, writes 17 layers of body-representative differently, and KPI preparation then stops with generated representative bundle differs from frozen bytes.

To generate the bundles yourself, run these commands from ovclash/ with $PY (%PY% in cmd.exe), the KPI input Python of the quick start. Each output directory must not exist yet. If generation fails, delete its output directory, if present, before you retry.

Linux x86-64 and AArch64:

"$PY" -B -m benchmarks.kpi.reference_fixtures generate --profile body-representative --output _build/reference-fixtures/body-representative
"$PY" -B -m benchmarks.kpi.reference_fixtures generate --profile cockpit-representative --output _build/reference-fixtures/cockpit-representative
"$PY" -B -c "from pathlib import Path; from benchmarks.kpi import representative_depth; r = representative_depth.generate_bundle(Path('_build/reference-fixtures/body-representative-depth')); print(r['manifest_sha256'], r['closure_digest'])"

Windows (cmd.exe):

"%PY%" -B -m benchmarks.kpi.reference_fixtures generate --profile body-representative --output _build/reference-fixtures/body-representative
"%PY%" -B -m benchmarks.kpi.reference_fixtures generate --profile cockpit-representative --output _build/reference-fixtures/cockpit-representative
"%PY%" -B -c "from pathlib import Path; from benchmarks.kpi import representative_depth; r = representative_depth.generate_bundle(Path('_build/reference-fixtures/body-representative-depth')); print(r['manifest_sha256'], r['closure_digest'])"

Each command exits 0 when its bundle is sealed. generate prints a JSON summary with these fields:

Field

Type

Required

Default or values

Description

manifest_sha256

string

Yes

64 lowercase hexadecimal digits

SHA-256 of the bundle.json bytes

closure_digest

string

Yes

64 lowercase hexadecimal digits

The closure_digest of bundle.json; see bundle manifest and seal

files

integer

Yes

1 or more

Number of member layers

bytes

integer

Yes

1 or more

Sum of the member layer sizes

elapsed_seconds

number

Yes

Seconds

Wall time of the command

metadata

object

Yes

See generation metadata

The generation metadata stored in bundle.json

Generation metadata#

The metadata object holds these fields:

Field

Type

Required

Default or values

Description

profile_id

string

Yes

The --profile value

The generated profile

family

string

Yes

body or cockpit

The assembly family

duration_seconds

number

Yes

--duration, default 2.0

The animation duration

instanced

boolean

Yes

true; false with --ordinary-references

Whether the references are instanceable

recipe

object

Yes

identifier is reference-fixtures-v1

The recipe parameters: identifier, profile, duration_seconds, instanced, tessellation_divisor, discretionary_triangle_scale, workload_intent, serialization_stress and byte_preflight

inventory

object

Yes

Authored and composed geometry counts, and path and hierarchy summaries

contacts

object

Yes

The planned contacts: cluster_pairs, cluster_groups, gates, probes and membership_digest

motion

object

Yes

samples_per_second is 32

time_codes_per_second, mover_key_counts, pose_digest, samples_per_second and sample_count

qualification

object

Yes

native_verified is false

native_verified, coverage and exclusions: what the generator does not prove

source

object

Yes

policy is recipe-version

The recipe identity: policy, sha256 and recipe (the identifier and version of recipe.json)

Pinned bundles#

The depth command prints only its manifest_sha256 and closure_digest. With the pinned interpreter, the three bundles reproduce their pins:

Bundle

manifest_sha256

closure_digest

Files

Bytes

body-representative

d60eecbf098a0162fbf46117418295dcb12a5a595b3ac47e59c34256e68c073d

5d7e7c425598b3fff2dad8fa67f8550523b38eb7133c886718b134ba3316f2ca

102

47,523,889

cockpit-representative

5259275efd9a934829438d39666bf0871190ca4fd7769501a1f59f8731c9af53

ef8bf2016e273cedc40588f801cecd476d948859ce815d4f1247b7d0cb1a193f

2,200

120,791,385

body-representative-depth

a773e8a47997ffa8af0a51d896699a48451a922bc5a343e47b700af218574f71

6b8c39b3affea1c1aabfd959504d1218ae4c54197301efcb2ee30766df6ffb57

102

47,513,313

The authority for these values is bundle.sha256 and bundle.closure_digest of each profile in benchmarks/kpi/representative_expectations.json, and fixture.bundle in benchmarks/kpi/representative_depth.json. The table changes with them. Expected work comes only from the reviewed contract files, never from a candidate build.

The depth bundle has no generate --profile entry; representative_depth.generate_bundle is its only generator. Of its layers, only root.usda differs from the body-representative bundle: it holds the Body motion compressed to 1.125 seconds and a probe schedule for 8 samples/s. Its bundle metadata records the recipe identifier representative-depth-v1.

An intentional recipe change requires a version bump in benchmarks/kpi/reference_fixtures/recipe.json and refreshed pins; see refresh pinned fixture identities. Comment, docstring and formatting edits need no refresh.

Open root.usda and keep the whole bundle directory. root.usda references the other layers, so it is not a portable stage on its own, and its size is not the input size.

Bundle manifest and seal#

generate seals each bundle by writing bundle.json exclusively; an existing bundle.json is never replaced. It holds exactly these fields, all required; a reader rejects any other field:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

Manifest format version

encoding

string

Yes

usda

Layer encoding: USDA, the ASCII text format of USD layers

entry

string

Yes

root.usda

The entry layer, relative to the bundle

policy

object

Yes

{"load": "all", "variants": "authored"}

The composition policy

metadata

object

Yes

At most 2 MiB of JSON

Generation metadata (recipe, source identity, inventory, contact and motion summaries); see generation metadata

metadata_sha256

string

Yes

64 lowercase hexadecimal digits

SHA-256 of the canonical JSON of metadata

members

array of objects

Yes

One object per layer

path (string, relative to the bundle), size_bytes (integer) and sha256 (string) of every layer

closure_digest

string

Yes

64 lowercase hexadecimal digits

SHA-256 of the canonical JSON of every other field of the manifest

The printed manifest_sha256 is the SHA-256 of the bundle.json bytes. The recipe identity in the metadata is the identifier and version of recipe.json with their SHA-256, for example {"policy": "recipe-version", "sha256": "...", "recipe": {"identifier": "reference-fixtures-v1", "version": 1}}.

Inspect a bundle#

Before you begin: generate the bundle as in generate and retain stages, and set $PY (%PY%) as in the quick start. From ovclash/, pass the bundle directory, here the Cockpit bundle of that section.

Linux x86-64 and AArch64:

"$PY" -B -m benchmarks.kpi.reference_fixtures inspect _build/reference-fixtures/cockpit-representative

Windows (cmd.exe):

"%PY%" -B -m benchmarks.kpi.reference_fixtures inspect _build/reference-fixtures/cockpit-representative

inspect re-reads the whole bundle, prints the verified manifest as JSON and exits 0. It checks the member inventory, every member’s size and SHA-256, the closure digest, and the USDA syntax and composition of every layer. Every member must be an ordinary .usda file listed in bundle.json and reachable from root.usda. Links, reparse points, hard-linked aliases, undeclared files and asset paths that leave the bundle are rejected. The bundle directory and every directory above it must also be real directories: generate, inspect and KPI preparation reject a path that passes through a symlink, junction or other reparse point.

--sha256 DIGEST also requires the bundle.json bytes to have that SHA-256. It then hashes the members without reparsing them. Pass only the digest of a fully validated manifest: the manifest_sha256 that generate printed, or a pinned value from pinned bundles.

When a command rejects an input or a file or native call fails (OSError, ValueError or RuntimeError), generate, inspect and measure print reference fixtures: <reason> and exit with code 4. An option that does not parse prints the usage message and exits with code 2.

Geometry and motion#

Body combines repeated carriers and roofs, nested instanced warehouse racks and departing assemblies. Cockpit combines deep paths, geometry payload layers, repeated tool prototypes, hidden branches and independent Module and Tool motion. Both recipes include diverse transforms, instancing and distinct mesh definitions. The bundle inventory reports authored geometry and composed placements separately; it makes no claim about contact correctness.

cockpit-representative is a single recipe with triangle-budget divisor 16. The KPI smoke and release profiles measure the same bundle. It is not a large-scene stress test. Its 63 instances of 21 tool prototypes and 6,400 hidden-branch meshes exercise deep composition, prototype fan-out and file opening. Hidden branches exercise filtering of invisible prims; their visibility is not animated. Contact construction covers:

  • spoke hubs and dense crossing-panel groups;

  • co-located duplicate pairs and a broad-phase decoy stack;

  • resting and crossing gates and motion probes;

  • one undivided high-triangle tail mesh per role (Structure, Module and Tool).

These are construction targets, not verified native results. Counts and saved stage sizes lists the bundle inventory.

cockpit-representative generation first runs a byte preflight (benchmarks/kpi/reference_fixtures/preflight.py). It predicts the authored USDA size, adds an 8% margin and fails when the prediction exceeds 160,000,000 bytes. It never adjusts the recipe to fit. The prediction is not a hard upper bound and covers authored USDA only. The bundle metadata records the result as recipe.byte_preflight.

Mover keys come from fixed 120-second (Cockpit) and 100-second (Body) timelines. Generation scales the key times to the animation duration, two seconds by default, and keeps every pose. Cockpit has 7 Module keys and 14 Tool keys. Each of the 15 Body movers (3 carriers and 12 roofs) has 601 keys. Ordinary Dynamic and Suite-save workloads (fresh saves through the Suite API) sample 0–2 seconds at 32 samples/s. The 1/32-second step is exact in binary, so the grid has 65 poses, both ends included. The depth bundle compresses the same Body motion into 1.125 seconds, and Dynamic depth samples it at 8 samples/s (10 poses). Detection is sampled: a contact that occurs only between two poses is not guaranteed to be found.

Query scopes and settings are frozen in the work contract; see the nine workloads. A different interval, task manager, geometry scope or sample rate defines different work and cannot reuse the existing expectations.

Structural census#

Before you begin: generate or copy a sealed bundle, and set $PY (%PY%) as in the quick start. From ovclash/, replace SAVED_BUNDLE with that bundle’s directory, such as _build/reference-fixtures/cockpit-representative, and NEW_REPORT_DIRECTORY with a directory outside the bundle, such as _build/census. --bundle takes the path of bundle.json. --output must be a new file outside the bundle directory; an output that already exists or lies inside the bundle stops the command with a usage error and exit code 2.

Linux x86-64 and AArch64:

"$PY" -B -m benchmarks.kpi.reference_census --bundle SAVED_BUNDLE/bundle.json --output NEW_REPORT_DIRECTORY/census.json

Windows (cmd.exe):

"%PY%" -B -m benchmarks.kpi.reference_census --bundle SAVED_BUNDLE/bundle.json --output NEW_REPORT_DIRECTORY/census.json

On success the command writes census.json, prints a one-line JSON summary with sorted keys, and exits 0. A changed or unsupported bundle, or an exceeded diagnostic limit, raises a ValueError, exits nonzero and writes no census.json. The summary copies these fields from census.json:

Field

Type

Required

Default or values

Description

output

string

Yes

The --output path as given

The written census

profile

string

Yes

provenance.profile_id

The bundle’s profile

sizes

object

Yes

usda_bytes and layers

The bundle size

visible

object

Yes

expanded.visible

The composed visible geometry counts

checks

object

Yes

metadata_cross_checks

The comparison with the bundle metadata; each count has metadata, census and match

seconds

number

Yes

elapsed_seconds

Wall time of the census

The census verifies every member, then reports at time code zero:

  • authored and composed geometry, visible and hidden;

  • prim types, face counts and triangle equivalents;

  • instance boundaries, path depth and transform classes.

It also compares its visible-mesh and expanded visible-triangle counts with the bundle metadata (metadata_cross_checks). Rotation counts describe transform bases, not surface-normal directions. Instance-boundary counts are not native prototype-cache entries. A census qualifies neither collision results nor timing.

census.json holds these top-level fields, all required:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

Census format version

provenance

object

Yes

profile_id, bundle_sha256 (the bundle.json SHA-256), closure_digest, source_sha (the recipe identity digest), admitted_manifest_supplied and member_hashes_verified

sizes

object

Yes

usda_bytes and layers of the bundle

authored

object

Yes

Geometry counts over all prim specs in all layers, with a face-vertex-count histogram

expanded

object

Yes

Composed geometry counts as visible, all and hidden, each with its face-vertex-count histogram

prims

object

Yes

Authored, composed and visible prim counts by type, with totals and mesh path depths

composition

object

Yes

native_prototype_cache_count is null

Authored composition arcs, instance boundaries and instance nesting depth

transforms

object

Yes

time_code is 0

Transform classes of authored, composed and visible prims, the source metersPerUnit and the rotation and scale definitions

metadata_cross_checks

object

Yes

For each compared inventory count, such as expanded_visible_triangles: metadata, census and match (boolean)

elapsed_seconds

number

Yes

Seconds

Wall time of the census

definitions

object

Yes

The text definitions of authored, composed, visible, polygon and depth counts

Diagnostic recipes and tools#

benchmarks/kpi/reference_fixtures/profiles.py also defines diagnostic recipes:

Profile

Purpose

body-validation, cockpit-validation

Small recipes with every triangle budget clamped to 256

body-ci, cockpit-ci

Intermediate recipes

cockpit-serialization-ci

The cockpit-ci assembly plus extra permanent probes that stress report serialization

generate --ordinary-references authors ordinary instead of instanceable references (USD references marked instanceable, whose instances share one prototype), and generate --duration SECONDS sets another animation duration (default 2.0). A representative recipe generated with either option no longer matches its pins. KPI never generates or measures these variants. The Python tests in tests/python_tests/test_reference_fixture_*.py cover the generator. The opt-in test_kpi_full_fixtures target runs the slow full-profile generation checks; see ordinary tests and dedicated workloads.

measure runs a saved bundle through the ovstage runtime that import ovclash loads in the calling environment. Before you begin, you need a Python interpreter in which import ovclash loads the ovstage backend, for example a virtual environment with the ovstage ovclash wheel installed. python in the command stands for that interpreter. python -c "import ovclash; print(ovclash.backend_info().backend_name)" prints ovstage when it is the right one. When it prints openusd or unknown, or import ovclash fails, measure cannot run in that interpreter: install the ovstage ovclash wheel into it, or use one that has it. Run the command from ovclash/, so that benchmarks is importable, and replace SAVED_BUNDLE and NEW_REPORT_DIRECTORY as for the structural census. It writes a JSON receipt to a new path outside the bundle:

python -m benchmarks.kpi.reference_fixtures measure --kind dynamic --report NEW_REPORT_DIRECTORY/receipt.json SAVED_BUNDLE

Option

Default

Meaning

--kind {static,dynamic}

static

static queries time zero. dynamic samples the bundle’s animation duration; for Cockpit it uses the KPI scopes, Structure against Module, Tool and Probes

--rate N

32

Dynamic samples per second

--tasks N

4

Worker tasks, 1 to 256; 1 runs single-threaded

--payloads

off

Also read every full native report, with report flags 30: the outline, the faces of both meshes and the points

--report PATH

required

New receipt path outside the bundle

The command prints the receipt and writes it to --report. It exits 0 when the audit passes and 2 when the audit failed; a rejected input exits 4 with reference fixtures: <reason>. The receipt holds these fields, all required:

Field

Type

Required

Default or values

Description

schema_version

integer

Yes

1

Receipt format version

profile, family

string

Yes

family is body or cockpit

The bundle’s profile ID and assembly family

kind

string

Yes

static or dynamic

The --kind value

duration_seconds, rate

number

Yes

The bundle’s animation duration and the --rate value

tasks, samples

integer

Yes

The --tasks value and the number of sampled times

closure_digest

string

Yes

64 lowercase hexadecimal digits

The measured bundle’s closure digest

measurement_sha256

string

Yes

64 lowercase hexadecimal digits

The KPI measurement identity; see measurement identity

backend

object

Yes

backend_name is ovstage

The fields of ovclash.backend_info()

native_library_sha256

string

Yes

64 lowercase hexadecimal digits

SHA-256 of the loaded native library

settings

object

Yes

The settings applied to the run

scope

object

Yes

The search sets a and b, arrays of prim paths; both empty for a full-scene run

timeline

object

Yes

The stage timeline data

open_seconds, create_seconds, pipeline_seconds, capture_seconds, audit_seconds

number

Yes

Seconds

Stage opening, pipeline creation, the sum of the pipeline steps, result capture and audit

phases

array of objects

Yes

One per pipeline step

name (string) and seconds (number) of each step

stats

object

Yes

The query statistics

results

object

Yes

The result counts, the per-sample record histogram and the membership digests; with --payloads, also the report fingerprints

audit

object

Yes

status is failed on a failed audit

The audit against the contact plan, including fully_qualified and mesh_coverage

environment

object

Yes

qualified is false

Diagnostic host counters before the run and process memory at result-ready; no CPU admission

qualification

string

Yes

States that the receipt is a diagnostic measurement only

measure rejects a backend other than ovstage and a bundle whose recipe identity differs from recipe.json. It cannot tell whether the current generator modules generated the bundle, so regenerate a diagnostic bundle after you edit them. measure is outside the KPI path: it approves neither expected work nor a timing budget. Product correctness coverage belongs in Sentinel.

Saved-reference diagnostic limits#

The saved-bundle readers in benchmarks/kpi/reference_capture.py, reference_census.py and reference_geometry.py validate the closed USDA grammar and the member hashes, and they bound their work. By default they allow a 180-second construction deadline, 4,000,000 composition operations, 250,000 composed nodes and 256 MiB of accounted composition storage (conservative accounting, not the process’s resident set size, RSS). An exhausted bound prevents a complete diagnostic or qualification and never authorizes a partial result.

reference_geometry is the independent geometry oracle of the reference-fixture tests; no KPI check, budget or baseline flow imports it. Its native fixture tests run only with OVCLASH_KPI_REFERENCE_GEOMETRY_NATIVE=1 and a configured runtime.

Package layout#

The benchmarks/kpi/reference_fixtures/ package holds these modules:

Module

Role

__main__.py

The generate, inspect and measure commands

profiles.py, recipe.json

The size tiers by profile ID, and the recipe identifier and version

generator.py

build_plan() plans a profile and generate() writes its layers. Re-exports the names of plan_model.py, pools.py, contact_cuts.py and usda_writer.py

plan_model.py

The Mesh, Group, Pool and Plan dataclasses and the deterministic number, digest, seeded-name and triangle-budget helpers

pools.py

The contact-group pool layout

contact_cuts.py

The contact-boundary cuts that the planner applies to a built plan

usda_writer.py

The streaming USDA writer of the bundle layers (_Writer)

structure.py, dimensions.py, clusters.py, part_transforms.py

Hierarchy recipes, cluster dimensions, special contact shapes and part frames

geometry.py, recipe_angles.py

Streamed mesh surfaces and exact angle values

motion.py

Mover keys, sample grids and analytical contact plans

bundle.py

generate_bundle(), which generates and seals a bundle for the generate command; the source identity; bundle verification for inspect

preflight.py

The Cockpit byte preflight

native.py, audit.py

measure: the native run and the audit of its results against the contact plan

generator.py looks up the contact cuts and _Writer in its own globals, so tests patch those names on generator. preflight.estimate_plan subclasses _Writer to count bytes, so the method names and signatures of _Writer are an extension API.