The wall-clock self-time of each settle, charged to the cost centre on top of a span
stack. One atom, nil when off, so a span off a timing run is a deref and a nil?
check. vaelii.bench.settle-phases reads it. See docs/nmtms.md, "Where the time
goes, measured".
A held namespace (vaelii.impl.types.prover states what that means): it defines the Clock type its instrument hints on, and requires no vaelii namespace, so the development browser's reloader never re-evaluates it, and an edit to it takes a restart.
The wall-clock self-time of each settle, charged to the cost centre on top of a span stack. One atom, nil when off, so a span off a timing run is a deref and a `nil?` check. `vaelii.bench.settle-phases` reads it. See docs/nmtms.md, "Where the time goes, measured". A held namespace (`vaelii.impl.types.prover` states what that means): it defines the `Clock` type its instrument hints on, and requires no vaelii namespace, so the development browser's reloader never re-evaluates it, and an edit to it takes a restart.
(begin-settle!)Bracket the start of one settle: charge the pre-settle interval to :outside, then
start a fresh per-settle tally.
Bracket the start of one settle: charge the pre-settle interval to `:outside`, then start a fresh per-settle tally.
(end-settle!)Bracket the end of one settle: charge the tail, file the per-settle record, and mark the instrument outside a settle again.
Bracket the end of one settle: charge the tail, file the per-settle record, and mark the instrument outside a settle again.
(enter! p)Open a span for centre p: charge the parent up to now, then push p. A deref and a
nil? check when the instrument is off.
Open a span for centre `p`: charge the parent up to now, then push `p`. A deref and a `nil?` check when the instrument is off.
(leave!)Close the current span: charge it up to now, then pop. Guards an empty stack so a span entered while the instrument was off (and toggled on mid-span) cannot underflow.
Close the current span: charge it up to now, then pop. Guards an empty stack so a span entered while the instrument was off (and toggled on mid-span) cannot underflow.
(note-passes! n)Record this settle's pass count.
Record this settle's pass count.
(note-region! n)Record this settle's relabelled region size, read once at the finish.
Record this settle's relabelled region size, read once at the finish.
(profiling?)Is the instrument collecting?
Is the instrument collecting?
(snapshot)The tallies so far as plain data, or nil when the instrument is off:
{:run {centre nanos} whole-run self-time per centre
:settles [{:nanos {centre nanos} :total :region :passes} …]}
A read, not a stop — the run keeps collecting.
The tallies so far as plain data, or nil when the instrument is off:
{:run {centre nanos} whole-run self-time per centre
:settles [{:nanos {centre nanos} :total :region :passes} …]}
A read, not a stop — the run keeps collecting.(start)Begin collecting, dropping whatever a previous run left. Bare, not !: the tally is
derived from a workload nobody stored, so re-running the workload recomputes it.
Begin collecting, dropping whatever a previous run left. Bare, not `!`: the tally is derived from a workload nobody stored, so re-running the workload recomputes it.
(stop)Charge the final interval, return the snapshot, and clear the instrument.
Charge the final interval, return the snapshot, and clear the instrument.
(with-phase p & body)Run body inside a span for centre p. Off a timing run this is a deref, a nil?
check and the body; on one it brackets the body with enter!/leave! so the centre is
charged its self-time even if body throws.
Run `body` inside a span for centre `p`. Off a timing run this is a deref, a `nil?` check and the body; on one it brackets the body with `enter!`/`leave!` so the centre is charged its self-time even if `body` throws.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |