stats_agg v0.1.5 Ciroque.Monitoring.Reducers
This module contains the functions necessary to maintain the data structure
used by the Ciroque.Monitoring.StatsAgg
module.
This module is not intended for direct use outside of the context of the StatsAgg module.
Summary
Functions
Calculates various statistics on the given array of execution durations
Records the given duration into the state
Calculates and returns the stats for the given keys in the given state
Functions
Calculates various statistics on the given array of execution durations.
Included are:
- Average
- Max
- Min
The return is a map containing the original array of durations, the above statistics and the most recent duration.
Note: While this can be used outside of the StatsAgg module, it is not intended for direct use outside of the Context of the StatsAgg module.
Records the given duration into the state.
Note: While this can be used outside of the StatsAgg module, it is not intended for direct use outside of the Context of the StatsAgg module.
Calculates and returns the stats for the given keys in the given state.
The shape of the data returned:
%{
avg_duration: integer,
durations: list(integer),
function: String.t,
group: String.t,
max_duration: integer,
min_duration: integer,
module: String.t,
most_recent_duration: integer,
}
Note: While this can be used outside of the StatsAgg module, it is not intended for direct use outside of the Context of the StatsAgg module.