pub struct FrameProfile {
pub frame_number: u64,
pub frame_start: Timestamp,
pub frame_end: Option<Timestamp>,
pub spans: Vec<ProfileSpan>,
pub counters: HashMap<String, CounterSample>,
pub memory: MemorySnapshot,
pub gpu_timestamp_start: Timestamp,
pub gpu_timestamp_end: Option<Timestamp>,
}Fields§
§frame_number: u64§frame_start: Timestamp§frame_end: Option<Timestamp>§spans: Vec<ProfileSpan>§counters: HashMap<String, CounterSample>§memory: MemorySnapshot§gpu_timestamp_start: Timestamp§gpu_timestamp_end: Option<Timestamp>Implementations§
Source§impl FrameProfile
impl FrameProfile
pub fn new(frame_number: u64, start: Timestamp) -> Self
pub fn cpu_duration(&self) -> Option<Duration>
pub fn gpu_duration(&self) -> Option<Duration>
pub fn total_span_time(&self, kind: SpanKind) -> Duration
pub fn slowest_span(&self) -> Option<&ProfileSpan>
pub fn spans_sorted_by_duration(&self) -> Vec<&ProfileSpan>
pub fn build_flamegraph(&self) -> FlamegraphNode
pub fn top_n_spans(&self, n: usize) -> Vec<(&ProfileSpan, Duration)>
Trait Implementations§
Source§impl Clone for FrameProfile
impl Clone for FrameProfile
Auto Trait Implementations§
impl Freeze for FrameProfile
impl RefUnwindSafe for FrameProfile
impl Send for FrameProfile
impl Sync for FrameProfile
impl Unpin for FrameProfile
impl UnsafeUnpin for FrameProfile
impl UnwindSafe for FrameProfile
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.