risingwave_common_metrics/monitor/
mod.rs1pub use connection::{EndpointExt, RouterExt, TcpConfig, monitor_connector};
16pub use rwlock::MonitoredRwLock;
17
18mod connection;
19pub mod in_mem;
20mod process;
21mod rwlock;
22
23use std::sync::LazyLock;
24
25use prometheus::Registry;
26
27#[cfg(target_os = "linux")]
28static PAGESIZE: std::sync::LazyLock<i64> =
29 std::sync::LazyLock::new(|| unsafe { libc::sysconf(libc::_SC_PAGESIZE) });
30
31#[cfg(target_os = "linux")]
32pub static CLOCK_TICK: std::sync::LazyLock<u64> =
33 std::sync::LazyLock::new(|| unsafe { libc::sysconf(libc::_SC_CLK_TCK) as u64 });
34
35pub static GLOBAL_METRICS_REGISTRY: LazyLock<Registry> = LazyLock::new(|| {
36 let registry = Registry::new();
37 process::monitor_process(®istry);
38 registry
39});