pub struct PerformanceMonitor { /* private fields */ }Expand description
Performance monitor for continuous monitoring
Implementations§
Source§impl PerformanceMonitor
impl PerformanceMonitor
Sourcepub fn with_target_fps(self, fps: u32) -> Self
pub fn with_target_fps(self, fps: u32) -> Self
Set target frame rate
Sourcepub const fn with_warning_threshold(self, threshold: f64) -> Self
pub const fn with_warning_threshold(self, threshold: f64) -> Self
Set warning threshold
Sourcepub fn record_frame(&mut self)
pub fn record_frame(&mut self)
Record a frame
Sourcepub fn record_frame_time(&mut self, ms: f64)
pub fn record_frame_time(&mut self, ms: f64)
Record a frame with explicit time
Sourcepub fn current_fps(&self) -> f64
pub fn current_fps(&self) -> f64
Get current FPS
Sourcepub fn frame_time_stats(&self) -> MetricStats
pub fn frame_time_stats(&self) -> MetricStats
Get frame time statistics
Sourcepub const fn frame_drops(&self) -> u64
pub const fn frame_drops(&self) -> u64
Get frame drop count
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Get frame count
Sourcepub fn is_within_target(&self) -> bool
pub fn is_within_target(&self) -> bool
Check if performance is within target
Sourcepub fn assert_performance(&self) -> ProbarResult<()>
pub fn assert_performance(&self) -> ProbarResult<()>
Assert performance meets target
Trait Implementations§
Source§impl Debug for PerformanceMonitor
impl Debug for PerformanceMonitor
Auto Trait Implementations§
impl Freeze for PerformanceMonitor
impl RefUnwindSafe for PerformanceMonitor
impl Send for PerformanceMonitor
impl Sync for PerformanceMonitor
impl Unpin for PerformanceMonitor
impl UnsafeUnpin for PerformanceMonitor
impl UnwindSafe for PerformanceMonitor
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