Struct puffin::FrameData

source ·
pub struct FrameData {
    pub scope_delta: Vec<Arc<ScopeDetails>>,
    pub full_delta: bool,
    /* private fields */
}
Expand description

One frame worth of profile data, collected from many sources.

If you turn on the the “packing” feature, this will compress the profiling data in order to save RAM.

Fields§

§scope_delta: Vec<Arc<ScopeDetails>>

Scopes that were registered during this frame.

§full_delta: bool

Does Self::scope_delta contain all the scopes up to this point? If false, it just contains the new scopes since last frame data.

Implementations§

source§

impl FrameData

source

pub fn new( frame_index: FrameIndex, thread_streams: BTreeMap<ThreadInfo, StreamInfo>, scope_delta: Vec<Arc<ScopeDetails>>, full_delta: bool ) -> Result<Self>

Create a new FrameData.

source

pub fn meta(&self) -> &FrameMeta

Returns meta data from this frame.

source

pub fn packed_size(&self) -> Option<usize>

Always returns None.

source

pub fn unpacked_size(&self) -> Option<usize>

Number of bytes used when unpacked.

source

pub fn bytes_of_ram_used(&self) -> usize

Bytes currently used by the unpacked data.

source

pub fn has_packed(&self) -> bool

Always returns false.

source

pub fn has_unpacked(&self) -> bool

Always returns true.

source

pub fn unpacked(&self) -> Result<Arc<UnpackedFrameData>, Never>

Return the unpacked data.

source

pub fn pack(&self)

Does nothing because this FrameData is unpacked by default.

source§

impl FrameData

source

pub fn frame_index(&self) -> u64

The index of this frame.

source

pub fn range_ns(&self) -> (NanoSecond, NanoSecond)

The range in nanoseconds of the entire profile frame.

source

pub fn duration_ns(&self) -> NanoSecond

The duration in nanoseconds of the entire profile frame.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.