diff options
Diffstat (limited to 'src/api/stats.rs')
| -rw-r--r-- | src/api/stats.rs | 4 |
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, |
