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 90b4fc2..37a7447 100644 --- a/src/api/stats.rs +++ b/src/api/stats.rs @@ -101,6 +101,9 @@ struct DocumentStats { saved_bytes_secs_ago: Option<u64>, /// How long the last measurement took (copy and save), in milliseconds. saved_bytes_took_ms: Option<u64>, + /// Writers (Automerge actors: a node's run each) with changes in the document, + /// counted with `saved_bytes`; absent until first counted. + writers: Option<usize>, /// How long takers of the document's lock waited for it, since start: the node's /// work on the one document queues there. lock_wait: crate::document::lock::LockWaits, @@ -360,6 +363,7 @@ pub(crate) async fn collect(state: &AppState, list: &PeerListResponse) -> StatsR saved_bytes: saved.map(|s| s.bytes), saved_bytes_secs_ago: saved.map(|s| s.at.elapsed().as_secs()), saved_bytes_took_ms: saved.map(|s| s.took.as_millis() as u64), + writers: saved.and_then(|s| s.writers), lock_wait: state.doc.waits(), }, catch_up: CatchUpStats { |
