Struct measureme::Profiler [−][src]
pub struct Profiler { /* fields omitted */ }
Implementations
pub fn with_counter<P: AsRef<Path>>(
path_stem: P,
counter: Counter
) -> Result<Profiler, Box<dyn Error + Send + Sync>>
pub fn bulk_map_virtual_to_single_concrete_string<I>(
&self,
virtual_ids: I,
concrete_id: StringId
) where
I: Iterator<Item = StringId> + ExactSizeIterator,
Records an event with the given parameters. The event time is computed automatically.
Records an event with the given parameters. The event time is computed automatically.
pub fn start_recording_interval_event<'a>(
&'a self,
event_kind: StringId,
event_id: EventId,
thread_id: u32
) -> TimingGuard<'a>
pub fn start_recording_interval_event<'a>(
&'a self,
event_kind: StringId,
event_id: EventId,
thread_id: u32
) -> TimingGuard<'a>
Creates a “start” event and returns a TimingGuard
that will create
the corresponding “end” event when it is dropped.
pub fn start_recording_interval_event_detached(
&self,
event_kind: StringId,
event_id: EventId,
thread_id: u32
) -> DetachedTiming
pub fn start_recording_interval_event_detached(
&self,
event_kind: StringId,
event_id: EventId,
thread_id: u32
) -> DetachedTiming
Creates a “start” event and returns a DetachedTiming
.
To create the corresponding “event” event, you must call
finish_recording_internal_event
with the returned
DetachedTiming
.
Since DetachedTiming
does not capture the lifetime of &self
,
this method can sometimes be more convenient than
start_recording_interval_event
- e.g. it can be stored
in a struct without the need to add a lifetime parameter.
Creates the corresponding “end” event for
the “start” event represented by timing
. You
must have obtained timing
from the same Profiler