Raxol.Terminal.ANSI.Monitor (Raxol v2.0.1)

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.

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.

handle_manager_info(msg, state)

Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_info/2.

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(init_opts \\ [])