use super::*;
#[derive(Clone, Copy, Debug, Default)]
pub struct CountingAllocator;
#[derive(Clone, Copy, Debug, Default, Eq, Getter, New, PartialEq)]
pub struct RawAllocCounters {
#[get(type(copy))]
pub(crate) alloc_count: u64,
#[get(type(copy))]
pub(crate) free_count: u64,
#[get(type(copy))]
pub(crate) bytes_allocated: u64,
#[get(type(copy))]
pub(crate) bytes_freed: u64,
#[get(type(copy))]
pub(crate) live_bytes_delta: i64,
#[get(type(copy))]
pub(crate) live_allocs_delta: i64,
#[get(type(copy))]
pub(crate) peak_live_bytes: u64,
}
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct AllocationSnapshot {
#[get(type(copy))]
pub(crate) alloc_count: u64,
#[get(type(copy))]
pub(crate) free_count: u64,
#[get(type(copy))]
pub(crate) bytes_allocated: u64,
#[get(type(copy))]
pub(crate) bytes_freed: u64,
#[get(type(copy))]
pub(crate) live_bytes_delta: u64,
#[get(type(copy))]
pub(crate) live_allocs_delta: u64,
#[get(type(copy))]
pub(crate) peak_live_bytes: u64,
}
#[derive(Debug)]
pub struct AllocationScopeGuard {
pub(crate) _lock_guard: Option<MutexGuard<'static, ()>>,
pub(crate) owns_scope: bool,
pub(crate) start_counters: RawAllocCounters,
}
#[derive(Clone, Copy, Debug, Default, Deserialize, Getter, PartialEq, Serialize)]
pub struct NativeHeapLifecycleProbe {
#[get(type(copy))]
pub(crate) cycles: u64,
#[get(type(copy))]
pub(crate) baseline_live_bytes: u64,
#[get(type(copy))]
pub(crate) after_drain_live_bytes: u64,
#[get(type(copy))]
pub(crate) live_bytes_slope_per_cycle: f64,
#[get(type(copy))]
pub(crate) baseline_live_allocations: u64,
#[get(type(copy))]
pub(crate) after_drain_live_allocations: u64,
#[get(type(copy))]
pub(crate) live_allocations_slope_per_cycle: f64,
#[get(type(copy))]
pub(crate) peak_live_bytes: u64,
#[get(type(copy))]
pub(crate) total_alloc_count: u64,
#[get(type(copy))]
pub(crate) total_free_count: u64,
#[get(type(copy))]
pub(crate) total_bytes_allocated: u64,
}