hashiverse_server_lib/server/stats/mod.rs
1//! # Server-stats subtrees
2//!
3//! Each subsystem contributes a JSON subtree to the [`PeerStatsRequestV1`]
4//! response via a free function named `<subsystem>_stats_subtree`. The
5//! top-level handler in [`crate::server::handlers::dispatch`] composes the
6//! full document by inserting each returned `serde_json::Value` at its own
7//! root key. Subsystems don't know their own root path — placement is a
8//! handler-side concern, kept here only for cheapness and consistency.
9
10pub mod environment_stats;
11pub mod kademlia_stats;
12pub mod request_counts;
13pub mod system_stats;
14
15pub use environment_stats::environment_stats_subtree;
16pub use kademlia_stats::kademlia_stats_subtree;
17pub use request_counts::request_counts_subtree;
18pub use system_stats::system_stats_subtree;