pub mod cli;
pub mod telemetry;
#[cfg(feature = "jemalloc")]
#[global_allocator]
pub static JEMALLOC_MEMORY_ALLOCATOR: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[derive(Clone, Debug, Default)]
pub struct ServiceInfo {
pub name: &'static str,
pub name_in_metrics: String,
pub version: &'static str,
pub author: &'static str,
pub description: &'static str,
}
#[macro_export]
macro_rules! service_info {
() => {
$crate::ServiceInfo {
name: env!("CARGO_PKG_NAME"),
name_in_metrics: env!("CARGO_PKG_NAME").replace("-", "_"),
version: env!("CARGO_PKG_VERSION"),
author: env!("CARGO_PKG_AUTHORS"),
description: env!("CARGO_PKG_DESCRIPTION"),
}
};
}