pub struct DoubleBufferStats {
pub total_frames: u64,
pub completed_frames: u64,
pub failed_frames: u64,
pub total_encode_time: Duration,
pub total_gpu_time: Duration,
pub cpu_stalls: u64,
/* private fields */
}Expand description
Performance statistics for the double-buffer submitter.
Fields§
§total_frames: u64Total frames submitted.
completed_frames: u64Total frames completed.
failed_frames: u64Total frames that failed during GPU execution.
total_encode_time: DurationTotal CPU encoding time across all frames.
total_gpu_time: DurationTotal GPU execution time across all frames.
cpu_stalls: u64Number of times the CPU had to stall waiting for a free slot.
Implementations§
Source§impl DoubleBufferStats
impl DoubleBufferStats
Sourcepub fn avg_latency(&self) -> Duration
pub fn avg_latency(&self) -> Duration
Average frame latency over the recent window.
Sourcepub fn max_latency(&self) -> Duration
pub fn max_latency(&self) -> Duration
Maximum frame latency in the recent window.
Sourcepub fn min_latency(&self) -> Duration
pub fn min_latency(&self) -> Duration
Minimum frame latency in the recent window.
Sourcepub fn cpu_utilisation(&self) -> f64
pub fn cpu_utilisation(&self) -> f64
Estimated CPU utilisation (encoding time / total time).
Sourcepub fn gpu_utilisation(&self) -> f64
pub fn gpu_utilisation(&self) -> f64
Estimated GPU utilisation (GPU time / total time).
Sourcepub fn estimated_fps(&self) -> f64
pub fn estimated_fps(&self) -> f64
Estimated throughput in frames per second (based on recent window).
Trait Implementations§
Source§impl Clone for DoubleBufferStats
impl Clone for DoubleBufferStats
Source§fn clone(&self) -> DoubleBufferStats
fn clone(&self) -> DoubleBufferStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DoubleBufferStats
impl Debug for DoubleBufferStats
Source§impl Default for DoubleBufferStats
impl Default for DoubleBufferStats
Source§fn default() -> DoubleBufferStats
fn default() -> DoubleBufferStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DoubleBufferStats
impl RefUnwindSafe for DoubleBufferStats
impl Send for DoubleBufferStats
impl Sync for DoubleBufferStats
impl Unpin for DoubleBufferStats
impl UnsafeUnpin for DoubleBufferStats
impl UnwindSafe for DoubleBufferStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more