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§
source§impl 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.