MCPcopy Create free account
hub / github.com/SIPp/sipp / globalStat

Method globalStat

src/stat.cpp:718–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716}
717
718int CStat::globalStat (E_Action P_action)
719{
720 switch (P_action) {
721 case E_OUT_OF_CALL_MSGS :
722 M_G_counters [CPT_G_C_OutOfCallMsgs - E_NB_COUNTER - 1]++;
723 M_G_counters [CPT_G_PD_OutOfCallMsgs - E_NB_COUNTER - 1]++;
724 M_G_counters [CPT_G_PL_OutOfCallMsgs - E_NB_COUNTER - 1]++;
725 break;
726
727 case E_WATCHDOG_MAJOR :
728 M_G_counters [CPT_G_C_WatchdogMajor - E_NB_COUNTER - 1]++;
729 M_G_counters [CPT_G_PD_WatchdogMajor - E_NB_COUNTER - 1]++;
730 M_G_counters [CPT_G_PL_WatchdogMajor - E_NB_COUNTER - 1]++;
731 break;
732
733 case E_WATCHDOG_MINOR :
734 M_G_counters [CPT_G_C_WatchdogMinor - E_NB_COUNTER - 1]++;
735 M_G_counters [CPT_G_PD_WatchdogMinor - E_NB_COUNTER - 1]++;
736 M_G_counters [CPT_G_PL_WatchdogMinor - E_NB_COUNTER - 1]++;
737 break;
738
739 case E_DEAD_CALL_MSGS :
740 M_G_counters [CPT_G_C_DeadCallMsgs - E_NB_COUNTER - 1]++;
741 M_G_counters [CPT_G_PD_DeadCallMsgs - E_NB_COUNTER - 1]++;
742 M_G_counters [CPT_G_PL_DeadCallMsgs - E_NB_COUNTER - 1]++;
743 break;
744
745 case E_FATAL_ERRORS :
746 M_G_counters [CPT_G_C_FatalErrors - E_NB_COUNTER - 1]++;
747 M_G_counters [CPT_G_PD_FatalErrors - E_NB_COUNTER - 1]++;
748 M_G_counters [CPT_G_PL_FatalErrors - E_NB_COUNTER - 1]++;
749 break;
750
751 case E_WARNING :
752 M_G_counters [CPT_G_C_Warnings - E_NB_COUNTER - 1]++;
753 M_G_counters [CPT_G_PD_Warnings - E_NB_COUNTER - 1]++;
754 M_G_counters [CPT_G_PL_Warnings - E_NB_COUNTER - 1]++;
755 break;
756
757 case E_AUTO_ANSWERED :
758 // Let's count the automatic answered calls
759 M_G_counters [CPT_G_C_AutoAnswered - E_NB_COUNTER - 1]++;
760 M_G_counters [CPT_G_PD_AutoAnswered - E_NB_COUNTER - 1]++;
761 M_G_counters [CPT_G_PL_AutoAnswered - E_NB_COUNTER - 1]++;
762 break;
763 default :
764 ERROR("CStat::ComputeStat() - Unrecognized Action %d", P_action);
765 return (-1);
766 } /* end switch */
767 return (0);
768}
769
770
771void CStat::computeRtt (unsigned long long P_start_time, unsigned long long P_stop_time, int which)

Callers

nothing calls this directly

Calls 1

ERRORFunction · 0.85

Tested by

no test coverage detected