]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9164: [core] add Session-Per-Sec-Last to heartbeat event
authorMichael Jerris <mike@jerris.com>
Mon, 16 May 2016 18:46:11 +0000 (14:46 -0400)
committerMichael Jerris <mike@jerris.com>
Mon, 16 May 2016 18:48:46 +0000 (14:48 -0400)
src/switch_core.c

index 4a8865612b0ee95a9ce0014b6abb9a7b55c154d4..039531bb864b9bcad95cfaad9c34af0054ae9527 100644 (file)
@@ -93,6 +93,7 @@ static void send_heartbeat(void)
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Count", "%u", switch_core_session_count());
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Max-Sessions", "%u", switch_core_session_limit(0));
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec", "%u", runtime.sps);
+               switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec-Last", "%u", runtime.sps_last);
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec-Max", "%u", runtime.sps_peak);
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Per-Sec-FiveMin", "%u", runtime.sps_peak_fivemin);
                switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Session-Since-Startup", "%" SWITCH_SIZE_T_FMT, switch_core_session_id() - 1);