pub struct Profiler { /* private fields */ }Expand description
Performance profiler for tracking render performance
Implementations§
Source§impl Profiler
impl Profiler
Sourcepub fn start_recording(&mut self)
pub fn start_recording(&mut self)
Start recording
Sourcepub fn stop_recording(&mut self)
pub fn stop_recording(&mut self)
Stop recording
Sourcepub fn is_recording(&self) -> bool
pub fn is_recording(&self) -> bool
Check if recording
Sourcepub fn toggle_recording(&mut self)
pub fn toggle_recording(&mut self)
Toggle recording
Sourcepub fn start_frame(&mut self)
pub fn start_frame(&mut self)
Start a new frame
Sourcepub fn record_render(&mut self, event: RenderEvent)
pub fn record_render(&mut self, event: RenderEvent)
Record a render event
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Get frame count
Sourcepub fn recording_duration(&self) -> Duration
pub fn recording_duration(&self) -> Duration
Get total recording duration
Sourcepub fn avg_frame_time(&self) -> Duration
pub fn avg_frame_time(&self) -> Duration
Get average frame time
Sourcepub fn stats_by_time(&self) -> Vec<&ComponentStats>
pub fn stats_by_time(&self) -> Vec<&ComponentStats>
Get stats sorted by total time
Sourcepub fn stats_by_count(&self) -> Vec<&ComponentStats>
pub fn stats_by_count(&self) -> Vec<&ComponentStats>
Get stats sorted by render count
Sourcepub fn view(&self) -> ProfilerView
pub fn view(&self) -> ProfilerView
Get current view
Sourcepub fn set_view(&mut self, view: ProfilerView)
pub fn set_view(&mut self, view: ProfilerView)
Set view
Sourcepub fn select_frame(&mut self, index: Option<usize>)
pub fn select_frame(&mut self, index: Option<usize>)
Select a frame
Sourcepub fn scroll_down(&mut self)
pub fn scroll_down(&mut self)
Scroll down
Sourcepub fn render_content(
&self,
buffer: &mut Buffer,
area: Rect,
config: &DevToolsConfig,
)
pub fn render_content( &self, buffer: &mut Buffer, area: Rect, config: &DevToolsConfig, )
Render profiler content
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Profiler
impl RefUnwindSafe for Profiler
impl Send for Profiler
impl Sync for Profiler
impl Unpin for Profiler
impl UnsafeUnpin for Profiler
impl UnwindSafe for Profiler
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