1use std::time::Duration;
13
14use mz_dyncfg::{Config, ConfigSet, ParameterScope};
15
16pub(crate) const MZ_METRICS_LGALLOC_MAP_REFRESH_INTERVAL: Config<Duration> = Config::new(
18 "mz_metrics_lgalloc_map_refresh_interval",
19 Duration::from_secs(0),
20 "How frequently to refresh lgalloc stats. A zero duration disables refreshing.",
21 ParameterScope::Replica,
22);
23
24pub(crate) const MZ_METRICS_LGALLOC_REFRESH_INTERVAL: Config<Duration> = Config::new(
26 "mz_metrics_lgalloc_refresh_interval",
27 Duration::from_secs(30),
28 "How frequently to refresh lgalloc stats. A zero duration disables refreshing.",
29 ParameterScope::Replica,
30);
31
32pub(crate) const MZ_METRICS_RUSAGE_REFRESH_INTERVAL: Config<Duration> = Config::new(
34 "mz_metrics_rusage_refresh_interval",
35 Duration::from_secs(30),
36 "How frequently to refresh rusage stats. A zero duration disables refreshing.",
37 ParameterScope::Replica,
38);
39
40pub fn all_dyncfgs(configs: ConfigSet) -> ConfigSet {
42 configs
43 .add(&MZ_METRICS_LGALLOC_MAP_REFRESH_INTERVAL)
44 .add(&MZ_METRICS_LGALLOC_REFRESH_INTERVAL)
45 .add(&MZ_METRICS_RUSAGE_REFRESH_INTERVAL)
46}