pub struct GpuTimingStatistics { /* private fields */ }Expand description
Current-device bounded diagnostics resource and loss accounting.
Counters reset during renderer recovery; previously pending samples are discarded. Query/resolve/map operations add measurement overhead. Buffer bytes below are nominal, excluding driver alignment, query storage and callback/backend allocation overhead. No render-thread GPU waits occur.
Implementations§
Source§impl GpuTimingStatistics
impl GpuTimingStatistics
Sourcepub const fn status(self) -> GpuTimingStatus
pub const fn status(self) -> GpuTimingStatus
Returns whether timing was requested and is usable on this device.
Sourcepub const fn capacity(self) -> usize
pub const fn capacity(self) -> usize
Maximum simultaneously reserved/submitted samples; zero when unavailable.
Sourcepub const fn pending(self) -> usize
pub const fn pending(self) -> usize
Reserved, mapping or completed-but-not-yet-collected ring entries.
Sourcepub const fn submitted(self) -> u64
pub const fn submitted(self) -> u64
Submitted timestamp intervals, including eventual failures or invalid data.
Sourcepub const fn dropped(self) -> u64
pub const fn dropped(self) -> u64
Passes not sampled because all slots were occupied or IDs were exhausted. Disabled/unavailable timing does not increment this counter.
Sourcepub const fn map_failures(self) -> u64
pub const fn map_failures(self) -> u64
Failed asynchronous maps or mapped-range access attempts.
Sourcepub const fn invalid_samples(self) -> u64
pub const fn invalid_samples(self) -> u64
Rejected intervals, including end-before-start/wrapped timestamps and durations outside the representable range. No zero substitute is emitted.
Sourcepub const fn poll_failures(self) -> u64
pub const fn poll_failures(self) -> u64
Device-poll failures; these disable the ring until renderer recovery.
Sourcepub const fn gpu_buffer_bytes(self) -> usize
pub const fn gpu_buffer_bytes(self) -> usize
Nominal bytes in eight 16-byte resolve and eight 16-byte readback buffers.
Sourcepub const fn query_count(self) -> usize
pub const fn query_count(self) -> usize
Number of timestamp query slots; query-set driver storage is not exposed.
Sourcepub const fn readback_bytes(self) -> u64
pub const fn readback_bytes(self) -> u64
Bytes queued for query resolution and readback copies over submitted samples. Each sample resolves and copies exactly two 64-bit timestamps; these diagnostic transfers are separate from scene upload statistics.
Sourcepub const fn collection_cpu(self) -> Duration
pub const fn collection_cpu(self) -> Duration
Sum of collection CPU costs, separate from measured GPU pass intervals.
Sourcepub const fn timestamp_period_nanoseconds(self) -> Option<f64>
pub const fn timestamp_period_nanoseconds(self) -> Option<f64>
Nanoseconds per raw query tick, or None when timing is unavailable.