pub struct StreamingProfiler {
pub history: VecDeque<FrameProfileData>,
pub current_frame_data: FrameProfileData,
pub current_frame: u64,
pub active_timers: HashMap<String, u64>,
pub max_history: usize,
pub total_events_recorded: u64,
pub peak_load_time_us: u64,
pub peak_frame_time_us: u64,
}Fields§
§history: VecDeque<FrameProfileData>§current_frame_data: FrameProfileData§current_frame: u64§active_timers: HashMap<String, u64>§max_history: usize§total_events_recorded: u64§peak_load_time_us: u64§peak_frame_time_us: u64Implementations§
Source§impl StreamingProfiler
impl StreamingProfiler
pub fn new(max_history: usize) -> Self
pub fn begin_frame(&mut self, frame: u64)
pub fn end_frame(&mut self)
pub fn record_event( &mut self, event_type: ProfilerEventType, start_us: u64, duration_us: u64, meta: u32, )
pub fn average_load_time_us(&self) -> f64
pub fn average_chunks_per_frame(&self) -> f64
pub fn compute_percentile_load_time(&self, pct: f64) -> u64
pub fn frame_time_ms(&self, frame_idx: usize) -> f64
pub fn event_count_by_type(&self, event_type: &ProfilerEventType) -> usize
pub fn history_len(&self) -> usize
pub fn report_summary(&self) -> ProfilerSummary
Trait Implementations§
Source§impl Clone for StreamingProfiler
impl Clone for StreamingProfiler
Auto Trait Implementations§
impl Freeze for StreamingProfiler
impl RefUnwindSafe for StreamingProfiler
impl Send for StreamingProfiler
impl Sync for StreamingProfiler
impl Unpin for StreamingProfiler
impl UnsafeUnpin for StreamingProfiler
impl UnwindSafe for StreamingProfiler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.