Lines
0 %
Functions
Branches
100 %
#[cfg(feature = "merc_metrics")]
use log::info;
#[global_allocator]
static GLOBAL_ALLOCATOR: crate::AllocCounter = crate::AllocCounter::new();
#[cfg(not(target_env = "msvc"))]
#[cfg(not(feature = "merc_metrics"))]
#[cfg(feature = "merc_jemalloc")]
static GLOBAL_ALLOCATOR: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(feature = "merc_mimalloc")]
static GLOBAL_ALLOCATOR: mimalloc::MiMalloc = mimalloc::MiMalloc;
/// Prints information from the [AllocCounter].
pub fn print_allocator_metrics() {
info!("{}", GLOBAL_ALLOCATOR.get_metrics());
}
pub fn print_allocator_metrics() {}