Raxol.Terminal.Metrics.Manager (Raxol v0.5.0)
View SourceManages terminal metrics and statistics collection, including performance metrics, usage statistics, and error tracking.
Summary
Functions
Gets the average characters processed per second.
Gets the average commands processed per second.
Gets a custom metric value.
Gets the error log.
Gets the error rate (errors per second).
Gets the current performance metrics.
Gets the uptime in milliseconds.
Gets the current usage statistics.
Creates a new metrics manager instance.
Records the processing of characters.
Records the processing of a command.
Records an error occurrence.
Records feature usage.
Resets all metrics to their initial state.
Adds or updates a custom metric.
Updates performance metrics.
Updates usage statistics.
Types
@type error_log() :: %{ timestamp: DateTime.t(), error_type: String.t(), message: String.t(), context: map() }
@type performance_metrics() :: %{ processing_time: non_neg_integer(), average_latency: float(), peak_memory: non_neg_integer(), buffer_usage: float() }
@type t() :: %Raxol.Terminal.Metrics.Manager{ characters_processed: non_neg_integer(), commands_processed: non_neg_integer(), custom_metrics: custom_metrics(), error_log: [error_log()], errors_encountered: non_neg_integer(), last_update: DateTime.t(), performance_metrics: performance_metrics(), start_time: DateTime.t(), usage_stats: usage_stats() }
@type usage_stats() :: %{ active_time: non_neg_integer(), idle_time: non_neg_integer(), command_frequency: %{required(String.t()) => non_neg_integer()}, feature_usage: %{required(String.t()) => non_neg_integer()} }
Functions
Gets the average characters processed per second.
Gets the average commands processed per second.
Gets a custom metric value.
Gets the error log.
Gets the error rate (errors per second).
Gets the current performance metrics.
Gets the uptime in milliseconds.
Gets the current usage statistics.
Creates a new metrics manager instance.
Records the processing of characters.
Records the processing of a command.
Records an error occurrence.
Records feature usage.
Resets all metrics to their initial state.
Adds or updates a custom metric.
Updates performance metrics.
Updates usage statistics.