// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0.

//! System monitoring utilities for TiCI components
//!
//! This crate provides cross-platform system monitoring capabilities including:
//! - CPU usage monitoring
//! - Memory usage tracking
//! - Disk space monitoring
//! - Process statistics
//! - cgroup support on Linux
#![feature(iterator_try_collect)]
#![allow(clippy::unnecessary_map_or)]
#![allow(clippy::redundant_closure)]
#![allow(clippy::needless_lifetimes)]
#![allow(clippy::type_complexity)]
#![allow(clippy::field_reassign_with_default)]
#![allow(clippy::let_unit_value)]
#![allow(clippy::bool_assert_comparison)]
#![allow(unexpected_cfgs)]
#![allow(dead_code)]
#![allow(unused_imports)]

// Include the original mod.rs as the main module
#[path = "mod.rs"]
mod system_mod;

// Re-export everything from the main module
pub use system_mod::*;

pub fn get_tag_from_thread_name() -> Option<String> {
    std::thread::current()
        .name()
        .and_then(|name| name.split("::").skip(1).last())
        .map(From::from)
}
