diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/stats.rs | 6 | ||||
| -rw-r--r-- | src/api/stats/prometheus.rs | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/api/stats.rs b/src/api/stats.rs index 96e8ad3..0bdb1b6 100644 --- a/src/api/stats.rs +++ b/src/api/stats.rs @@ -137,6 +137,10 @@ struct SyncStats { #[serde(rename_all = "camelCase")] struct RelayStats { announce_rounds: u64, + /// Of those, quick ones to all neighbours (some change had no writer's tree), and + /// slow ones (`swarm::relay`). + treeless_rounds: u64, + slow_rounds: u64, pulls: u64, /// Announcements of heads we lacked that waited for the pull in progress. pulls_queued: u64, @@ -340,6 +344,8 @@ pub(crate) async fn collect(state: &AppState, list: &PeerListResponse) -> StatsR }, relay: RelayStats { announce_rounds: node.relay.announce_rounds, + treeless_rounds: node.relay.treeless_rounds, + slow_rounds: node.relay.slow_rounds, pulls: node.relay.pulls, pulls_queued: node.relay.pulls_queued, tree_forwards: node.relay.tree_forwards, diff --git a/src/api/stats/prometheus.rs b/src/api/stats/prometheus.rs index 03643ee..5b1fc8c 100644 --- a/src/api/stats/prometheus.rs +++ b/src/api/stats/prometheus.rs @@ -639,6 +639,18 @@ pub(super) fn render(stats: &StatsResponse, list: &PeerListResponse) -> String { relay.announce_rounds as f64, ); out.single( + "treeless_rounds_total", + "counter", + "Of the announcement rounds, quick ones to all neighbours: some change had no writer's tree.", + relay.treeless_rounds as f64, + ); + out.single( + "slow_rounds_total", + "counter", + "Of the announcement rounds, slow ones after changes passed on along writers' trees.", + relay.slow_rounds as f64, + ); + out.single( "pulls_total", "counter", "Pulls of changes we lacked, started.", |
