Raxol. Performance. CycleProfiler. Stats
(Raxol v2.6.0)
View Source
Pure functions for computing statistics from cycle profiler timing data.
Computes min, max, average, and percentile (p50, p95, p99) values from lists of timing measurements. Used by CycleProfiler to summarize update and render cycle performance.
Summary
Functions
Computes statistics for a list of numeric values (microseconds).
Computes statistics for multiple named fields extracted from a list of structs/maps.
Formats a timing_stats map into a human-readable report string.
Types
Functions
@spec compute([number()]) :: timing_stats() | nil
Computes statistics for a list of numeric values (microseconds).
Returns a map with count, min, max, avg, p50, p95, p99. Returns nil for an empty list.
@spec compute_multi([map()], [atom()]) :: %{required(atom()) => timing_stats() | nil}
Computes statistics for multiple named fields extracted from a list of structs/maps.
Parameters
entries- List of maps/structsfields- List of field keys to extract and compute stats for
Returns
Map of %{field_name => timing_stats()}.
@spec format_report(timing_stats() | nil, String.t()) :: String.t()
Formats a timing_stats map into a human-readable report string.