add peak sps to stats and a command to reset it

This commit is contained in:
Anthony Minessale committed 2013-07-19 15:16:42 -05:00
1 parent 75bdc43d82
commit c510f3f52e
7 files changed
+27 -4

No files matched your search

+4
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;