pub struct FrameData { /* private fields */ }
Expand description
One frame worth of profile data, collected from many sources.
If you turn on the “packing” feature, then FrameData
has interior mutability with double storage:
- Unpacked data (
UnpackedFrameData
) - Packed (compressed) data
One or both are always stored. This allows RAM-efficient storage and viewing of many frames of profiling data. Packing and unpacking is done lazily, on-demand.
Implementations
sourceimpl FrameData
impl FrameData
pub fn new(
frame_index: FrameIndex,
thread_streams: BTreeMap<ThreadInfo, StreamInfo>
) -> Result<Self>
pub fn meta(&self) -> &FrameMeta
sourcepub fn packed_size(&self) -> Option<usize>
pub fn packed_size(&self) -> Option<usize>
Number of bytes used by the packed data, if packed.
sourcepub fn unpacked_size(&self) -> Option<usize>
pub fn unpacked_size(&self) -> Option<usize>
Number of bytes used when unpacked, if known.
sourcepub fn bytes_of_ram_used(&self) -> usize
pub fn bytes_of_ram_used(&self) -> usize
bytes currently used by the unpacked and packed data.
sourcepub fn has_packed(&self) -> bool
pub fn has_packed(&self) -> bool
Do we have a packed version stored internally?
sourcepub fn has_unpacked(&self) -> bool
pub fn has_unpacked(&self) -> bool
Do we have a unpacked version stored internally?
sourcepub fn unpacked(&self) -> Result<Arc<UnpackedFrameData>>
pub fn unpacked(&self) -> Result<Arc<UnpackedFrameData>>
Return the unpacked data.
This will lazily unpack if needed (and only once).
Returns Err
if failing to decode the packed data.
sourcepub fn write_into(&self, write: &mut impl Write) -> Result<()>
pub fn write_into(&self, write: &mut impl Write) -> Result<()>
sourceimpl FrameData
impl FrameData
pub fn frame_index(&self) -> u64
pub fn range_ns(&self) -> (NanoSecond, NanoSecond)
pub fn duration_ns(&self) -> NanoSecond
Auto Trait Implementations
impl !RefUnwindSafe for FrameData
impl Send for FrameData
impl Sync for FrameData
impl Unpin for FrameData
impl !UnwindSafe for FrameData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more