How long an operation's waits take

How long an operation's waits take

A wait that completes with no measurement records how long it took under its operation, and a later wait on that operation is due once it has stood that long; one that takes longer is kept apart as overdue. stado waits measured reads those records: every operation measured on this machine with its measurement, longest first, and under each the waits that completed past it, so the builds, child processes, channels and requests that take longest here are seen in one place:

stado waits measured [--over SECONDS] [--json]
stado waits measured accept OPERATION --wait ID [--json]
stado waits measured forget OPERATION [--json]

--over keeps only operations whose measurement exceeds that many seconds; it is the reader's threshold, and Stado keeps none. The text form prints measured waits <directory>: <n> operation(s), one line per operation, its seconds and the operation, and under it one overdue <seconds> (due by <seconds>), ended <time>: wait <id> line per overdue completion; --json prints {"directory", "over_seconds", "measured": [{"operation", "longest_seconds", "overdue": [{"wait", "took_seconds", "due_seconds", "ended_at"}]}]}. Listing changes nothing. A machine whose HOME and STADO_WAITS_MEASURED_DIR are both unset fails with the measured waits cannot be found: neither STADO_WAITS_MEASURED_DIR nor HOME is set, so the measured waits have no directory, and a record or overdue file it cannot read with the measured waits cannot be read: <the file and why>.

accept takes the overdue completion of wait ID as the operation's measurement, when it is the operation's real duration and not one stalled run, and drops it from the overdue ones; it answers the new and the replaced seconds ({"operation", "accepted_wait", "longest_seconds", "replaced_seconds"}). forget drops the measurement and its overdue completions, so the next wait on the operation opens with termin: brak and its completion is the new measurement ({"operation", "forgotten_seconds"}). Each refuses, stated not_found, no measurement is kept for <operation>; stado waits measured lists them, and accept refuses wait <id> is not an overdue completion of <operation>; stado waits measured --json lists each operation's overdue completions; a file that cannot be locked, written or removed is named with its cause. Stado Desktop's Waits section reads them with Read measured waits: one row per operation with its seconds and a Forget button, and under it each overdue completion with an Accept button; both changes ask for confirmation and read the list again. A host whose Stado reports no overdue completions is said so under each row.

Source: this website