euv-core 0.48.1

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Truthful per-frame adaptive rendering and presentation observability metrics snapshot.
#[derive(Clone, Copy, Data, Debug, PartialEq, Serialize)]
pub struct AdaptiveFrameMetrics {
    /// Active display mode refresh rate in Hertz (`Unobservable` when host does not expose display mode).
    #[get(type(copy))]
    pub(crate) display_mode_hz: ObservableMetric<f64>,
    /// Cumulative frame callbacks received during the active window.
    #[get(type(copy))]
    pub(crate) frame_callback_count: u64,
    /// Observed frame-callback interval in milliseconds (distinct from compositor presentation).
    #[get(type(copy))]
    pub(crate) frame_callback_interval_ms: ObservableMetric<f64>,
    /// Number of newly presented frames confirmed by compositor or proxy (`Unobservable` when unverified).
    #[get(type(copy))]
    pub(crate) actual_presented_new_frames: ObservableMetric<u64>,
    /// 50th percentile actual present interval in milliseconds.
    #[get(type(copy))]
    pub(crate) actual_present_interval_p50_ms: ObservableMetric<f64>,
    /// 95th percentile actual present interval in milliseconds.
    #[get(type(copy))]
    pub(crate) actual_present_interval_p95_ms: ObservableMetric<f64>,
    /// 99th percentile actual present interval in milliseconds.
    #[get(type(copy))]
    pub(crate) actual_present_interval_p99_ms: ObservableMetric<f64>,
    /// Source provenance of the present interval metrics (`CompositorMeasured`, `SubmissionProxy`, `Unobservable`).
    #[get(type(copy))]
    pub(crate) present_timing_source: PresentTimingSource,
    /// Explicit outcome of the most recent presentation attempt (`Submitted`, `SkippedUnchanged`, `Failed`).
    #[get(type(copy))]
    pub(crate) present_outcome: SurfacePresentOutcome,
    /// Cumulative presentation submission failures encountered.
    #[get(type(copy))]
    pub(crate) present_submit_failures: u64,
    /// Cumulative post-submission presentation failures encountered.
    #[get(type(copy))]
    pub(crate) present_failures: u64,
    /// Measured CPU rasterization duration in milliseconds (`Unobservable` when uninstrumented or inactive).
    #[get(type(copy))]
    pub(crate) cpu_raster_ms: ObservableMetric<f64>,
    /// True whenever a CPU RGBA software mirror or software framebuffer path was active on this frame.
    #[get(type(copy))]
    pub(crate) cpu_mirror_active: bool,
    /// Exact texture/framebuffer bytes uploaded on this frame (`0` on steady-state direct GPU draw).
    #[get(type(copy))]
    pub(crate) texture_upload_bytes: u64,
    /// Active pixel/command upload strategy used for this frame.
    #[get(type(copy))]
    pub(crate) upload_strategy: UploadStrategy,
    /// Measured GPU execution duration in milliseconds (`Unobservable` without GPU timestamp queries).
    #[get(type(copy))]
    pub(crate) gpu_exec_ms: ObservableMetric<f64>,
    /// Measured GPU wait/stall duration in milliseconds (`Unobservable` without fence/queue timing).
    #[get(type(copy))]
    pub(crate) gpu_wait_ms: ObservableMetric<f64>,
    /// End-to-end input event to verified presentation latency in milliseconds.
    #[get(type(copy))]
    pub(crate) input_to_present_latency_ms: ObservableMetric<f64>,
    /// Target frame interval in milliseconds derived from display mode (e.g., `6.94 ms` for 144 Hz).
    #[get(type(copy))]
    pub(crate) target_frame_interval_ms: f64,
    /// Whether the OS is actively throttling display refresh rate below the nominal mode.
    #[get(type(copy))]
    pub(crate) os_refresh_throttled: ObservableMetric<bool>,
    /// Snapshot of the unified 5-stage adaptive render router and handoff coordinator state.
    #[get(type(copy))]
    pub(crate) adaptive_router: AdaptiveRouterSnapshot,
}