LATENCY RESET

Since 1.1.0Observability

Syntax

LATENCY RESET [event ...]

Clears what the latency monitor has recorded: the samples of every event, or, with names, of those events only. A cleared event leaves LATENCY LATEST, LATENCY HISTORY and LATENCY GRAPH, and its maximum, the fourth field of LATENCY LATEST, starts again from the next sample. Use it after fixing a cause of latency, so that what is recorded next is new.

The monitor keeps recording as before: latency-monitor-threshold is not changed. The per-command figures of LATENCY HISTOGRAM are kept apart, and are not cleared. A name that is no event's is passed over.

Reply

The number of events that had samples and were cleared: all of them with no arguments, or those among the names given. 0 if there was nothing to clear.

Examples

> CONFIG SET latency-monitor-threshold 100
OK
> DEBUG SLEEP 0.15
OK
> LATENCY RESET nosuch
(integer) 0
> LATENCY RESET command nosuch
(integer) 1
> LATENCY HISTORY command
(empty array)
> LATENCY RESET
(integer) 0