Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 1.31 KB

stats.md

File metadata and controls

70 lines (43 loc) · 1.31 KB

NkSIP Stats Plugin

Name

nksip_stats

Description

This plugins implements a (yet) very simple statistics module. Once activated, it will take note of the response time for each received request, and for each period (5 secs by default), compute minimum, maximum, average and standard deviation of response times.

Dependant Plugins

None

Configuration Values

Service configuration values

None

Global configuration values

You can use the global configuration value nksip_stats_period to change the statistics calculation period from the default of 5 seconds

API functions

info/0

info() ->
    nksip:optslist().

Gets some statistics about current number of calls, dialogs, queues, etc.

get_uas_avg/0

get_uas_avg() ->
    {Min::integer(), Max::integer(), Avg::integer(), Std::integer()}.

Gets the call statistics for the current period.

Callback functions

None

Examples

nksip:start("my_app", nksip_callbacks, [], [{plugins, [nksip_stats]}]).

and afterwards

nksip_stats:get_uas_avg().