kafka_dae_diagnostics.veto_diagnostics

Veto diagnostics utilities.

Members

VetoDiagnostics

Veto diagnostics.

class kafka_dae_diagnostics.veto_diagnostics.VetoDiagnostics(_run_veto_counts: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.int64]] = <factory>, _recent_veto_counts: ~numpy.ndarray[tuple[~typing.Any, ...], ~numpy.dtype[~numpy.int64]] = <factory>, _num_frames: int = 0, _recent_veto_masks: ~collections.deque[int] = <factory>, _lock: ~threading.RLock = <factory>, max_recent_frames: int = 100)[source]

Bases: object

Veto diagnostics.

add_veto(veto: int) None[source]

Add a veto from a new frame.

get_recent_veto_count() ndarray[tuple[Any, ...], dtype[int64]][source]

Get an array of veto counts, keyed by veto index, for recent frames.

get_recent_veto_percentages() ndarray[tuple[Any, ...], dtype[float64]][source]

Get an array of veto percentages, keyed by veto index, for recent frames.

get_run_veto_count() ndarray[tuple[Any, ...], dtype[int64]][source]

Get an array of veto counts, keyed by veto index, for the whole run.

get_run_veto_percentages() ndarray[tuple[Any, ...], dtype[float64]][source]

Get an array of veto percentages, keyed by veto index, for the whole run.

max_recent_frames: int = 100

Maximum number of frames to keep in the ‘recent frames’ queue.

reset() None[source]

Reset veto statistics (at the start of a new run).