Expand description
The slow log: a command or door call that takes more than a second is one JSON line in
<supercode home>/logs/slow.jsonl, so slowness reads as bug monitoring (the audit reads it
every round). The Node packages write the same lines (@volter/supercode-harness-sdk/slow-log).
{ v: 1, at, kind: "command"|"door"|"call", name, args, ms, outcome, machine, pid, caller, slowest: { step, ms } }. slowest is the longest step the command noted. Writing never
fails the command it measures.
Constants§
- ROTATE_
BYTES - The log’s size before it rotates: it and the one rotation before it are all that is kept.
- SLOW_MS
- Anything slower than this many milliseconds is written.
Functions§
- note_
step - A step of the running command took
ms; the longest is the command’sslowest, and every step’s total is in its line’ssteps. - path
- Where the lines go.
- record
- One line, when
msis above the bound.calleris asked only then (resolving a caller reads the process table). Answers whether a line was written. - redact_
args - The arguments as the log keeps them: secrets replaced, each at most 200 characters.
- slowest_
step - The longest step noted so far.
- timed
- Run
fas the stepstepof the running command.