Raxol.Terminal.ScreenBuffer.Metrics (Raxol v2.0.1)
View SourceHandles metrics collection and management for the terminal screen buffer. This module provides functions for recording and retrieving various metrics related to screen buffer performance, operations, and resource usage.
Summary
Types
@type metric_tags() :: map()
@type metric_type() :: :performance | :operation | :resource
@type t() :: %Raxol.Terminal.ScreenBuffer.Metrics{ metrics: %{required(String.t()) => {metric_value(), metric_tags()}}, operation_metrics: %{required(String.t()) => number()}, performance_metrics: %{required(String.t()) => number()}, resource_metrics: %{required(String.t()) => number()} }
Functions
@spec collect(t(), metric_type()) :: %{required(String.t()) => metric_value()}
@spec get(t(), String.t(), metric_tags()) :: metric_value() | nil
@spec get_by_type(t(), metric_type()) :: %{required(String.t()) => metric_value()}
@spec get_value(t(), String.t()) :: {metric_value(), metric_tags()} | nil
@spec record(t(), String.t(), metric_value(), metric_tags()) :: t()