#[non_exhaustive]pub enum ProfileMode {
HeapSummaryAllocated,
HeapSummaryRetained,
HeapFlameAllocated,
HeapFlameRetained,
Statement,
Coverage,
Bytecode,
BytecodePairs,
TimeFlame,
Typecheck,
None,
}
Expand description
How to profile starlark code.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HeapSummaryAllocated
The heap profile mode provides information about the time spent in each function and allocations performed by each function. Enabling this mode has the side effect of disabling garbage-collection. This profiling mode is the recommended one.
HeapSummaryRetained
Like heap summary, but information about retained memory after module is frozen.
HeapFlameAllocated
Like heap profile, but writes output comparible with flamegraph.pl.
HeapFlameRetained
Like heap flame, but information about retained memory after module is frozen.
Statement
The statement profile mode provides information about time spent in each statement.
Coverage
Code coverage.
Bytecode
The bytecode profile mode provides information about bytecode instructions.
BytecodePairs
The bytecode profile mode provides information about bytecode instruction pairs.
TimeFlame
Provide output compatible with flamegraph.pl.
Typecheck
Profile runtime typechecking.
None
Don’t record any profile information.
Implementations§
Source§impl ProfileMode
impl ProfileMode
Sourcepub fn requires_frozen_module(&self) -> bool
pub fn requires_frozen_module(&self) -> bool
Profile data for this mode can be obtained from
FrozenModule::heap_profile
.
Trait Implementations§
Source§impl Allocative for ProfileMode
impl Allocative for ProfileMode
Source§impl Clone for ProfileMode
impl Clone for ProfileMode
Source§fn clone(&self) -> ProfileMode
fn clone(&self) -> ProfileMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProfileMode
impl Debug for ProfileMode
Source§impl Display for ProfileMode
impl Display for ProfileMode
Source§impl FromStr for ProfileMode
impl FromStr for ProfileMode
Source§impl Hash for ProfileMode
impl Hash for ProfileMode
Source§impl PartialEq for ProfileMode
impl PartialEq for ProfileMode
impl Eq for ProfileMode
impl StructuralPartialEq for ProfileMode
Auto Trait Implementations§
impl Freeze for ProfileMode
impl RefUnwindSafe for ProfileMode
impl Send for ProfileMode
impl Sync for ProfileMode
impl Unpin for ProfileMode
impl UnwindSafe for ProfileMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more