pub struct Data { /* private fields */ }
Expand description
Structures that aggregates all the information about the allocations so far.
Implementations
sourceimpl Data
impl Data
sourcepub fn mark_timestamp(&mut self, ts: SinceStart)
pub fn mark_timestamp(&mut self, ts: SinceStart)
Marks a timestamp.
This sets the current time to the input timestamp.
sourcepub fn alloc_count(&self) -> usize
pub fn alloc_count(&self) -> usize
Total number of allocations.
sourcepub fn get_stats() -> Res<Option<AllocStats>>
pub fn get_stats() -> Res<Option<AllocStats>>
Allocation statistics stored in the global data.
sourcepub fn stats(&self) -> Option<AllocStats>
pub fn stats(&self) -> Option<AllocStats>
Allocation statistics.
sourcepub fn current_time(&self) -> &SinceStart
pub fn current_time(&self) -> &SinceStart
Current time accessor.
sourcepub fn start_time(&self) -> Res<Date>
pub fn start_time(&self) -> Res<Date>
Time at which the profiling run started.
sourcepub fn get_alloc(&self, uid: Alloc) -> Option<&Alloc>
pub fn get_alloc(&self, uid: Alloc) -> Option<&Alloc>
Alloc accessor.
Fails if the UID is unknown.
sourcepub fn iter_allocs(&self) -> impl Iterator<Item = &Alloc>
pub fn iter_allocs(&self) -> impl Iterator<Item = &Alloc>
Iterates over all the allocations.
sourcepub fn has_new_stuff_since(&self, time: Option<(Alloc, SinceStart)>) -> bool
pub fn has_new_stuff_since(&self, time: Option<(Alloc, SinceStart)>) -> bool
True if there are any new events since some timestamp.
sourcepub fn last_events(&self) -> Option<(Alloc, SinceStart)>
pub fn last_events(&self) -> Option<(Alloc, SinceStart)>
Yields the last events at the current time.
sourcepub fn iter_new_events<'me>(
&'me self,
since: Option<(Alloc, SinceStart)>,
action: impl FnMut(Either<&'me Alloc, (SinceStart, &'me Alloc)>) -> Res<bool>
) -> Res<()>
pub fn iter_new_events<'me>(
&'me self,
since: Option<(Alloc, SinceStart)>,
action: impl FnMut(Either<&'me Alloc, (SinceStart, &'me Alloc)>) -> Res<bool>
) -> Res<()>
Iterates over the new (de)allocation events in chronological order.
Argument since
is an optional pair containing an allocation UID, and a time-of-death
(TOD). Input action
will run on all new allocations since the UID (exclusive), and all the
deallocations since the TOD (exclusive).
Input function action
returns a boolean indicating whether the iteration should continue.
sourceimpl Data
impl Data
sourcepub fn stats_do(&mut self, action: impl FnOnce(&mut AllocStats))
pub fn stats_do(&mut self, action: impl FnOnce(&mut AllocStats))
Applies some action on the allocation statistics.
sourcepub fn fill_stats(&mut self) -> Res<()>
pub fn fill_stats(&mut self) -> Res<()>
Fills the allocation statistics.
sourcepub fn reset(&mut self, dump_dir: impl Into<PathBuf>, init: Init)
pub fn reset(&mut self, dump_dir: impl Into<PathBuf>, init: Init)
Resets the data.
Called when the init file of a run has changed.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
Blanket Implementations
sourceimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
sourcefn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified method Read more
sourcefn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford method by default Read more
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
impl<T> ConvUtil for T
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
sourceimpl<T, U> IntoColor<U> for T where
U: FromColor<T>,
impl<T, U> IntoColor<U> for T where
U: FromColor<T>,
sourcefn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
sourceimpl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for T where
U: FromColorUnclamped<T>,
sourcefn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
sourceimpl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for T where
U: TryFromColor<T>,
sourcefn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
type Err = NoError
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.