From 67b5c3ae079f9f524bf0c52521a62811da407ad0 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 9 Nov 2026 20:31:10 +0000 Subject: stats: the writers of the document How many writers (Automerge actors) the document's changes have matters: a writer is a node's run (each start, rejoin or drop makes one, a start keeping the one of before with `--keep-actor` after a clean stop), and every transfer of the whole history carries a signature for each. `/admin/stats` now says it (`document.writers`, and `document_writers` for Prometheus), counted from the changes' metadata alongside the saved size's measurement in the background (at least a minute apart), as that takes time proportional to the document too; an export, which measures the size alone, keeps the count of before. The dashboard's figures show it with the rest. --- docs/measurements.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/measurements.md') diff --git a/docs/measurements.md b/docs/measurements.md index 33f325c..15aa614 100644 --- a/docs/measurements.md +++ b/docs/measurements.md @@ -39,6 +39,7 @@ whole seconds in JSON unless named `…Ms`; Prometheus has seconds throughout. | JSON | Prometheus | Meaning | |---|---|---| | `document.heads` | `document_heads` | Heads of the local document now. 1 means every change has been merged into one line of history; more means concurrent writes not yet followed by a merging write. | +| `document.writers` | `document_writers` | Writers (Automerge actors) with changes in the document, counted with the saved size. Each start, rejoin or drop of a node makes one (a start keeps the one of before with `--keep-actor` after a clean stop), and every transfer of the whole history carries a signature for each; a remake starts again from the writers that write in the new epoch. | | `document.maxHeads` | `document_max_heads` | The most heads seen right after applying a sync message. A high value shows how concurrent the swarm's writing gets; it also bounds keepalive size (above 32 heads, keepalives carry a digest and 32 of them). | | `document.savedBytes` | `document_saved_bytes` | The document as Automerge saves it (compressed): roughly what a joining node downloads and what a document file rewrite writes. Measured in the background, only after a change, at least a minute apart and at most 1% of the time (a document that takes 2 s to save is measured every 200 s at most); an export (`GET /admin/document`) counts as a measurement. `savedBytesSecsAgo` and `savedBytesTookMs` say how fresh and how costly. | | `document.lockWait.read`, `.write`: `count`, `sumUs`, `maxUs`, `buckets[]` (`leUs`) | `document_lock_wait_seconds{mode}` (histogram), `document_lock_wait_max_seconds{mode}` | How long takers of the document's lock waited for it, since start, by mode. Readers (the API's reads, topology, stats, generating sync messages, serving changes and deltas, saves) wait only for a writer; writers (applying sync messages and fetched changes, writes, epoch switches) wait for everyone. Buckets from 10 µs to 10 s, the last unbounded; not cumulative in JSON. | -- cgit v1.3.1