From: <cha...@us...> - 2008-09-25 02:37:41
|
Revision: 538 http://sipp.svn.sourceforge.net/sipp/?rev=538&view=rev Author: charlespwright Date: 2008-09-25 02:35:53 +0000 (Thu, 25 Sep 2008) Log Message: ----------- Enh: -timeout_error flag will immediately terminate SIPp with a fatal error if the global timeout (-timeout) is reached. Modified Paths: -------------- sipp/trunk/sipp.cpp sipp/trunk/sipp.hpp Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2008-09-22 15:48:36 UTC (rev 537) +++ sipp/trunk/sipp.cpp 2008-09-25 02:35:53 UTC (rev 538) @@ -272,6 +272,7 @@ , SIPP_OPTION_TRANSPORT, NULL, 1}, {"timeout", "Global timeout. Default unit is seconds. If this option is set, SIPp quits after nb units (-timeout 20s quits after 20 seconds).", SIPP_OPTION_TIME_SEC, &global_timeout, 1}, + {"timeout_error", "SIPp fails if the global timeout is reached is set (-timeout option required).", SIPP_OPTION_SETFLAG, &timeout_error, 1}, {"timer_resol", "Set the timer resolution. Default unit is milliseconds. This option has an impact on timers precision." "Small values allow more precise scheduling but impacts CPU usage." "If the compression is on, the value is set to 50ms. The default value is 10ms.", SIPP_OPTION_TIME_MS, &timer_resolution, 1}, @@ -3239,6 +3240,9 @@ } void timeout_alarm(int param){ + if (timeout_error) { + ERROR("%s timed out after '%.3lf' seconds", scenario_file, ((double)clock_tick / 1000LL)); + } quitting = 1; timeout_exit = true; } Modified: sipp/trunk/sipp.hpp =================================================================== --- sipp/trunk/sipp.hpp 2008-09-22 15:48:36 UTC (rev 537) +++ sipp/trunk/sipp.hpp 2008-09-25 02:35:53 UTC (rev 538) @@ -216,6 +216,7 @@ extern char * stat_delimiter _DEFVAL(";"); extern bool timeout_exit _DEFVAL(false); +extern bool timeout_error _DEFVAL(false); extern unsigned long report_freq_dumpRtt _DEFVAL (DEFAULT_FREQ_DUMP_RTT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |