Raxol.Terminal.ANSI.Monitor (Raxol v0.5.0)

View Source

Provides monitoring capabilities for the ANSI handling system. Tracks performance metrics, errors, and sequence statistics.

Summary

Functions

Returns a specification to start this module under a supervisor.

Gets the current metrics.

Records an error in ANSI sequence processing.

Records the processing of an ANSI sequence.

Resets the metrics.

Starts the ANSI monitor process.

Types

metrics()

@type metrics() :: %{
  total_sequences: non_neg_integer(),
  total_bytes: non_neg_integer(),
  sequence_types: %{required(atom()) => non_neg_integer()},
  errors: [{DateTime.t(), String.t(), map()}],
  performance: %{
    parse_time_ms: float(),
    process_time_ms: float(),
    total_time_ms: float()
  }
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_metrics()

@spec get_metrics() :: metrics()

Gets the current metrics.

record_error(input, reason, context)

@spec record_error(String.t(), String.t(), map()) :: :ok

Records an error in ANSI sequence processing.

record_sequence(input)

@spec record_sequence(String.t()) :: :ok

Records the processing of an ANSI sequence.

reset_metrics()

@spec reset_metrics() :: :ok

Resets the metrics.

start_link(opts \\ [])

@spec start_link(Keyword.t()) :: GenServer.on_start()

Starts the ANSI monitor process.