euv-performance 0.48.0

Reproducible CPU, layout, rasterization, and allocation benchmarks for the cross-platform euv runtime.
Documentation
/// CLI flag to emit a schema-valid Observability Report v1 JSON document.
pub const BENCH_FLAG_OBSERVABILITY_JSON: &str = "--observability-json";
/// Single authoritative Observability Report schema version string (`"1.0"`).
pub const OBSERVABILITY_SCHEMA_VERSION_V1: &str = "1.0";
/// Default budget version tag attached to emitted metric thresholds.
pub const OBSERVABILITY_BUDGET_VERSION_V1: &str = "euv-perf-budget-v1";
/// Default commit label when invoked outside a CI commit tag environment.
pub const OBSERVABILITY_DEFAULT_COMMIT: &str = "local-worktree";
/// Default Cargo profile label for emitted observability reports.
pub const OBSERVABILITY_DEFAULT_PROFILE: &str = "release";
/// Reference target frame interval in milliseconds for 144 Hz (`1000.0 / 144.0 ~= 6.94 ms`).
pub const OBSERVABILITY_TARGET_144HZ_MS: f64 = 1_000.0 / 144.0;

pub(crate) const OBS_OS_KEY_MACOS: &str = "macos";
pub(crate) const OBS_OS_KEY_WINDOWS: &str = "windows";
pub(crate) const OBS_OS_KEY_LINUX: &str = "linux";
pub(crate) const OBS_OS_MACOS: &str = "macOS";
pub(crate) const OBS_OS_LINUX: &str = "Linux";
pub(crate) const OBS_OS_WINDOWS: &str = "Windows";
pub(crate) const OBS_DEVICE_HEADLESS_HOST: &str = "headless-host";
pub(crate) const OBS_BACKEND_SOFTWARE: &str = "software";
pub(crate) const OBS_MODE_HEADLESS_STRESS: &str = "headless-stress-matrix";
pub(crate) const OBS_TOOL_NAME: &str = "euv-performance";
pub(crate) const OBS_TOOL_VERSION: &str = env!("CARGO_PKG_VERSION");
pub(crate) const OBS_TOOL_SCOPE: &str = "frame_interaction,layout_render_cache,lifecycle_owners";
pub(crate) const OBS_TOOL_SCOPE_WITH_HEAP: &str =
    "frame_interaction,layout_render_cache,lifecycle_owners,native_heap";
pub(crate) const OBS_FIXTURE_STRESS_MATRIX: &str = "stress-matrix-ab-tail-ttff-alloc";
pub(crate) const OBS_CHECKPOINT_POST_DRAIN: &str = "post_drain";
pub(crate) const OBS_SCOPE_FRAME: &str = "frame_interaction";
pub(crate) const OBS_SCOPE_LAYOUT: &str = "layout_render_cache";
pub(crate) const OBS_SCOPE_LIFECYCLE: &str = "lifecycle_owners";
pub(crate) const OBS_SCOPE_GPU: &str = "gpu_resources";
pub(crate) const OBS_SCOPE_NATIVE_HEAP: &str = "native_heap";
pub(crate) const OBS_REASON_NO_GPU_HEADLESS: &str =
    "headless software stress matrix does not allocate native GPU surfaces";
pub(crate) const OBS_REASON_ALLOC_TRACKER_DISABLED: &str =
    "in-process counting global allocator feature 'allocation-tracking' disabled at compile time";
pub(crate) const OBS_METRIC_FRAME_INTERVAL: &str = "frame.interval_ms";
pub(crate) const OBS_METRIC_FRAME_COUNT: &str = "frame.count";
pub(crate) const OBS_METRIC_FRAME_MISSED_VSYNC: &str = "frame.missed_vsync_pct";
pub(crate) const OBS_METRIC_STARTUP_READY_MS: &str = "startup.ready_ms";
pub(crate) const OBS_METRIC_STARTUP_FIRST_PRESENT_MS: &str = "startup.first_present_ms";
pub(crate) const OBS_METRIC_LAYOUT_INVALIDATIONS: &str = "layout.invalidations";
pub(crate) const OBS_METRIC_LAYOUT_PASSES: &str = "layout.passes";
pub(crate) const OBS_METRIC_LAYOUT_CHANGED_PASSES: &str = "layout.changed_passes";
pub(crate) const OBS_METRIC_LAYOUT_CHANGED_NODES: &str = "layout.changed_nodes_total";
pub(crate) const OBS_METRIC_DIRTY_AREA_RATIO: &str = "render.dirty_area_ratio";
pub(crate) const OBS_METRIC_PARTIAL_REDRAW_COUNT: &str = "render.partial_redraw_count";
pub(crate) const OBS_METRIC_FULL_REDRAW_COUNT: &str = "render.full_redraw_count";
pub(crate) const OBS_METRIC_DRAW_COMMANDS: &str = "render.draw_commands";
pub(crate) const OBS_METRIC_PIXELS_SHADED: &str = "render.pixels_shaded";
pub(crate) const OBS_METRIC_DESTROYED_OWNERS: &str = "destroyed_owner.live_objects";
pub(crate) const OBS_METRIC_HEAP_LIVE_BYTES: &str = "heap.live_bytes";
pub(crate) const OBS_METRIC_HEAP_LIVE_ALLOCS: &str = "heap.live_allocations";
pub(crate) const OBS_METRIC_HEAP_ALLOC_COUNT: &str = "heap.alloc_count";
pub(crate) const OBS_METRIC_HEAP_FREE_COUNT: &str = "heap.free_count";
pub(crate) const OBS_METRIC_MEMORY_PEAK_BYTES: &str = "memory.peak_bytes";
pub(crate) const OBS_EXT_FRAME_P99_MS: &str = "frame_p99_ms";
pub(crate) const OBS_EXT_FRAME_P99_9_MS: &str = "frame_p99_9_ms";
pub(crate) const OBS_EXT_MISSED_240HZ_PCT: &str = "missed_240hz_pct";
pub(crate) const OBS_EXT_MISSED_360HZ_PCT: &str = "missed_360hz_pct";
pub(crate) const OBS_EXT_MISSED_480HZ_PCT: &str = "missed_480hz_pct";
pub(crate) const OBS_EXT_HEAP_BYTES_ALLOCATED: &str = "heap_bytes_allocated";
pub(crate) const OBS_EXT_STEADY_ALLOCS_PER_FRAME: &str = "steady_state_allocs_per_frame";
pub(crate) const OBS_EXT_STEADY_BYTES_PER_FRAME: &str = "steady_state_bytes_per_frame";
pub(crate) const OBS_EXT_TTFF_INIT_MS: &str = "ttff_app_renderer_init_ms";
pub(crate) const OBS_EXT_TTFF_FONT_MS: &str = "ttff_font_ready_ms";
pub(crate) const OBS_EXT_TTFF_MOUNT_MS: &str = "ttff_initial_mount_ms";
pub(crate) const OBS_EXT_TTFF_LAYOUT_MS: &str = "ttff_first_layout_ms";
pub(crate) const OBS_EXT_TTFF_PAINT_MS: &str = "ttff_first_paint_ms";
pub(crate) const OBS_EXT_TTFF_PRESENT_MS: &str = "ttff_first_present_ms";
pub(crate) const OBS_WINDOW_STRESS_ITERS: &str = "stress_measured_iterations";
pub(crate) const OBS_WINDOW_COLD_START: &str = "cold_start_ttff_runs";
pub(crate) const OBS_WINDOW_POST_DRAIN: &str = "post_drain";
pub(crate) const OBS_SOURCE_EUV_PERF: &str = "euv-performance::stress_matrix";
pub(crate) const OBS_SOURCE_REACTIVE_ARENA: &str = "euv-core::reactive_scope_dispose";
pub(crate) const OBS_CLOCK_MONOTONIC: &str = "std::time::Instant";
pub(crate) const OBS_EVIDENCE_ID_STRESS: &str = "ev-stress-matrix-run";
pub(crate) const OBS_EVIDENCE_ARTIFACT_STRESS: &str = "performance/BENCHMARK_REPORT.md";
pub(crate) const OBS_EVIDENCE_DESC_STRESS: &str = "In-process euv-performance stress matrix latency, counting allocator, TTFF, and layout telemetry";
pub(crate) const OBS_OWNER_PARTIAL_DAMAGE: &str = "euv-core::layout_partial_damage";
pub(crate) const OBS_FINDING_PARITY_MISMATCH: &str =
    "Partial-layout damage framebuffer diverged from full redraw reference";
pub(crate) const OBS_UNIT_MS: &str = "ms";
pub(crate) const OBS_UNIT_COUNT: &str = "count";
pub(crate) const OBS_UNIT_RATIO: &str = "ratio";
pub(crate) const OBS_ERR_SCHEMA_VERSION: &str = "schema_version must be '1.0'";
pub(crate) const OBS_ERR_EMPTY_TOOLS: &str = "tools must be non-empty";
pub(crate) const OBS_ERR_EMPTY_COVERAGE: &str = "coverage must be non-empty";
pub(crate) const OBS_ERR_LAYOUT_INVARIANT: &str = "layout.changed_passes exceeds layout.passes";
pub(crate) const OBS_ERR_BROKEN_EVIDENCE: &str = "metric or finding references unknown evidence id";
pub(crate) const OBS_ERR_FAKE_ZERO: &str =
    "unmeasured or missing scope must not carry numeric metric values";
pub(crate) const OBS_ERR_PASS_MISSING_COVERAGE: &str =
    "status 'pass' forbidden while required coverage scope is not measured";
pub(crate) const OBS_ERR_PASS_BLOCKING_FINDING: &str =
    "status 'pass' forbidden while blocking findings are present";
pub(crate) const OBS_ERR_LEAK_MISSING_BOUNDS: &str =
    "measured leak metric requires baseline and after_drain";
pub(crate) const OBS_ERR_COMMON_MISSING_VALUE: &str = "measured common metric requires value";
pub(crate) const OBS_ERR_PASS_MISSING_REQUIRED_METRIC: &str =
    "status 'pass' missing required metric for measured scope";
pub(crate) const OBS_HEAP_PROBE_CYCLES: u64 = 5;
pub(crate) const OBS_THRESHOLD_FRAME_P95_MS: f64 = 16.67;
pub(crate) const OBS_THRESHOLD_FULL_REDRAW_MAX: f64 = 0.0;
pub(crate) const OBS_THRESHOLD_DIRTY_RATIO_MAX: f64 = 0.5;
pub(crate) const OBS_THRESHOLD_DESTROYED_OWNERS_MAX: f64 = 0.0;
pub(crate) const OBS_TIMING_SOURCE_SUBMISSION_PROXY: &str = "submission_proxy";
pub(crate) const OBS_TIMING_SOURCE_UNOBSERVABLE: &str = "unobservable";
pub(crate) const OBS_METRIC_DISPLAY_MODE_HZ: &str = "display.mode_hz";
pub(crate) const OBS_METRIC_FRAME_CALLBACK_COUNT: &str = "frame.callback_count";
pub(crate) const OBS_METRIC_FRAME_CALLBACK_INTERVAL_MS: &str = "frame.callback_interval_ms";
pub(crate) const OBS_METRIC_ACTUAL_PRESENTED_NEW_FRAMES: &str = "frame.actual_presented_new_frames";
pub(crate) const OBS_METRIC_ACTUAL_PRESENT_INTERVAL_MS: &str = "frame.actual_present_interval_ms";
pub(crate) const OBS_METRIC_PRESENT_SUBMIT_FAILURES: &str = "frame.present_submit_failures";
pub(crate) const OBS_METRIC_PRESENT_FAILURES: &str = "frame.present_failures";
pub(crate) const OBS_METRIC_CPU_RASTER_MS: &str = "render.cpu_raster_ms";
pub(crate) const OBS_METRIC_TEXTURE_UPLOAD_BYTES: &str = "render.texture_upload_bytes";
pub(crate) const OBS_METRIC_GPU_EXEC_MS: &str = "gpu.exec_ms";
pub(crate) const OBS_METRIC_GPU_WAIT_MS: &str = "gpu.wait_ms";
pub(crate) const OBS_METRIC_INPUT_TO_PRESENT_MS: &str = "frame.input_to_present_ms";
pub(crate) const OBS_METRIC_TARGET_INTERVAL_MS: &str = "frame.target_interval_ms";
pub(crate) const OBS_WINDOW_144HZ_REF: &str = "144hz_reference_6_94ms";
pub(crate) const OBS_WINDOW_ADAPTIVE_FRAME: &str = "adaptive_frame_snapshot";
pub(crate) const OBS_REASON_HEADLESS_NO_COMPOSITOR: &str = "headless simulation has no hardware compositor presentation timestamps (submission_proxy only)";
pub(crate) const OBS_REASON_HEADLESS_NO_GPU_TIMESTAMPS: &str =
    "headless simulation does not execute hardware GPU timestamp queries";
pub(crate) const OBS_REASON_HEADLESS_NO_INPUT_PRESENT: &str =
    "headless simulation does not measure real OS input-to-scanout latency";
pub(crate) const OBS_ERR_UNOBSERVABLE_REASON: &str =
    "unobservable metric requires a non-empty diagnostic reason";
pub(crate) const OBS_ERR_PROXY_COMPOSITOR_CONFLICT: &str =
    "proxy metric cannot declare compositor_measured timing_source";
pub(crate) const OBS_FIXTURE_ADAPTIVE_RUNTIME: &str = "adaptive-render-runtime-observability";
pub(crate) const OBS_CHECKPOINT_RUNTIME_SNAPSHOT: &str = "runtime_snapshot";
pub(crate) const OBS_SOURCE_ADAPTIVE_ROUTER: &str = "euv-core::adaptive_render_router";
pub(crate) const OBS_EVIDENCE_ID_ADAPTIVE: &str = "ev-adaptive-frame-metrics";
pub(crate) const OBS_EVIDENCE_ARTIFACT_ADAPTIVE: &str = "adaptive-frame-metrics.json";
pub(crate) const OBS_EVIDENCE_DESC_ADAPTIVE: &str =
    "Truthful per-frame adaptive render router and presentation observability snapshot";