add peak sps to stats and a command to reset it

This commit is contained in:
Anthony Minessale
2013-07-19 15:16:42 -05:00
parent 75bdc43d82
commit c510f3f52e
7 changed files with 27 additions and 4 deletions

View File

@@ -1008,6 +1008,10 @@ SWITCH_MODULE_RUNTIME_FUNCTION(softtimer_runtime)
}
switch_mutex_lock(runtime.throttle_mutex);
runtime.sps_last = runtime.sps_total - runtime.sps;
if (runtime.sps_last > runtime.sps_peak) {
runtime.sps_peak = runtime.sps_last;
}
runtime.sps = runtime.sps_total;
switch_mutex_unlock(runtime.throttle_mutex);
tick = 0;