tracing-prof 0.3.0

Experimental library for profiling tracing spans.
Documentation
//! Profiling library for `tracing` that tracks various metrics
//! such as CPU time, wall time, allocations, and heap usage.

mod events;

pub mod allocator;
pub mod config;
pub mod layer;
pub mod reporter;
pub mod sampler;

pub use allocator::TrackingAllocator;
pub use config::ProfileConfig;
pub use layer::ProfileLayer;
pub use reporter::ProfileReporter;

#[cfg(feature = "performant")]
pub(crate) type IndexMap<K, V> = indexmap::IndexMap<K, V, ahash::RandomState>;
#[cfg(feature = "performant")]
pub(crate) type IndexSet<T> = indexmap::IndexSet<T, ahash::RandomState>;

#[cfg(not(feature = "performant"))]
pub(crate) type IndexMap<K, V> = indexmap::IndexMap<K, V>;
#[cfg(not(feature = "performant"))]
pub(crate) type IndexSet<T> = indexmap::IndexSet<T>;

#[cfg(feature = "performant")]
pub(crate) type Instant = minstant::Instant;
#[cfg(not(feature = "performant"))]
pub(crate) type Instant = std::time::Instant;