summaryrefslogtreecommitdiffstats
path: root/src/api/stats.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 22:08:32 +0100
committertv <tv@krebsco.de>2026-10-26 22:14:01 +0100
commit5a32e746cf7aec3e4ca76616b6b66f023de53988 (patch)
tree9eca1f501d8961a53497c03412c222fd485e76ac /src/api/stats.rs
parent08f5df1f0a2e22876a5b49a4f9e2e05a61df882a (diff)
add delta blobs
Diffstat (limited to 'src/api/stats.rs')
-rw-r--r--src/api/stats.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/stats.rs b/src/api/stats.rs
index a34d4ed..fabbffd 100644
--- a/src/api/stats.rs
+++ b/src/api/stats.rs
@@ -114,6 +114,9 @@ struct SyncStats {
last_from_neighbour_secs: Option<u64>,
/// Peers whose heads differ from ours while sync is idle (`peers.md`, healing).
diverged_peers: usize,
+ /// The largest sync message received since start (its Automerge part). Larger
+ /// transfers come as deltas (blobs).
+ largest_received_bytes: u64,
}
/// Passing changes on (`swarm::relay`) and serving blobs, since start.
@@ -256,6 +259,7 @@ async fn collect(state: &AppState) -> StatsResponse {
sync: SyncStats {
last_from_neighbour_secs: last_from_neighbour.map(|at| at.elapsed().as_secs()),
diverged_peers,
+ largest_received_bytes: node.largest_sync_received,
},
relay: RelayStats {
announce_rounds: node.relay.announce_rounds,