euv-performance 0.47.1

Reproducible CPU, layout, rasterization, and allocation benchmarks for the cross-platform euv runtime.
Documentation
use super::*;

/// Process-wide counting global allocator wrapping the system allocator with zero-cost disabled fast path.
#[cfg(feature = "allocation-tracking")]
#[global_allocator]
pub(crate) static COUNTING_ALLOCATOR: CountingAllocator = CountingAllocator;

/// Active scope depth gating hot-path atomic updates (`0` means disabled fast path).
pub(crate) static ALLOC_TRACK_DEPTH: AtomicUsize = AtomicUsize::new(0);
/// Cumulative heap allocation calls recorded while tracking is enabled.
pub(crate) static ALLOC_COUNT: AtomicU64 = AtomicU64::new(0);
/// Cumulative heap deallocation calls recorded while tracking is enabled.
pub(crate) static FREE_COUNT: AtomicU64 = AtomicU64::new(0);
/// Cumulative heap bytes allocated while tracking is enabled.
pub(crate) static BYTES_ALLOCATED: AtomicU64 = AtomicU64::new(0);
/// Cumulative heap bytes freed while tracking is enabled.
pub(crate) static BYTES_FREED: AtomicU64 = AtomicU64::new(0);
/// Signed net live bytes delta since the active outermost scope started.
pub(crate) static LIVE_BYTES_DELTA: AtomicI64 = AtomicI64::new(0);
/// Signed net live allocation count delta since the active outermost scope started.
pub(crate) static LIVE_ALLOCS_DELTA: AtomicI64 = AtomicI64::new(0);
/// Peak positive live bytes delta observed inside the active outermost scope.
pub(crate) static PEAK_LIVE_BYTES: AtomicU64 = AtomicU64::new(0);
/// Outer scope serializer preventing parallel test threads from cross-contaminating frame allocation snapshots.
pub(crate) static ALLOC_SCOPE_LOCK: Mutex<()> = Mutex::new(());

thread_local! {
    pub(crate) static ALLOC_THREAD_IN_SCOPE: Cell<bool> = const { Cell::new(false) };
}