pub struct Store {
pub(crate) spans: Vec<Span>,
pub(crate) self_time_tree: Option<SelfTimeTree<NonZeroUsize>>,
max_self_time_lookup_time: AtomicU64,
}
Fields§
§spans: Vec<Span>
§self_time_tree: Option<SelfTimeTree<NonZeroUsize>>
§max_self_time_lookup_time: AtomicU64
Implementations§
Source§impl Store
impl Store
pub fn new() -> Self
pub fn reset(&mut self)
pub fn has_time_info(&self) -> bool
pub fn add_span( &mut self, parent: Option<NonZeroUsize>, start: Timestamp, category: String, name: String, args: Vec<(String, String)>, outdated_spans: &mut FxHashSet<NonZeroUsize>, ) -> NonZeroUsize
pub fn add_args( &mut self, span_index: NonZeroUsize, args: Vec<(String, String)>, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn set_max_self_time_lookup(&self, time: Timestamp)
fn insert_self_time( &mut self, start: Timestamp, end: Timestamp, span_index: NonZeroUsize, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn add_self_time( &mut self, span_index: NonZeroUsize, start: Timestamp, end: Timestamp, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn set_total_time( &mut self, span_index: NonZeroUsize, start_time: Timestamp, total_time: Timestamp, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn set_parent( &mut self, span_index: NonZeroUsize, parent: NonZeroUsize, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn add_allocation( &mut self, span_index: NonZeroUsize, allocation: u64, count: u64, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn add_deallocation( &mut self, span_index: NonZeroUsize, deallocation: u64, count: u64, outdated_spans: &mut FxHashSet<NonZeroUsize>, )
pub fn complete_span(&mut self, span_index: NonZeroUsize)
pub fn invalidate_outdated_spans( &mut self, outdated_spans: &FxHashSet<NonZeroUsize>, )
pub fn root_spans(&self) -> impl Iterator<Item = SpanRef<'_>>
pub fn root_span(&self) -> SpanRef<'_>
pub fn span(&self, id: NonZeroUsize) -> Option<(SpanRef<'_>, bool)>
Auto Trait Implementations§
impl !Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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