[netperf-dev] netperf2 commit notice r355 - in trunk: . src
raj at netperf.org
raj at netperf.org
Tue Sep 14 14:51:26 PDT 2010
Author: raj
Date: 2010-09-14 14:51:26 -0700 (Tue, 14 Sep 2010)
New Revision: 355
Modified:
trunk/Release_Notes
trunk/src/netsh.c
trunk/src/netsh.h
trunk/src/nettest_omni.c
Log:
add the googleesque sleep before data transfer changes
Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes 2010-09-14 19:55:36 UTC (rev 354)
+++ trunk/Release_Notes 2010-09-14 21:51:26 UTC (rev 355)
@@ -1,9 +1,14 @@
These are the Release Notes for post-revision 2.4.5 of netperf:
+*) Add global -s option to cause omni tests to pause between
+ setting-up the test and actually starting it. pause is in seconds.
+ Poor man's way to (attempt to) avoid issues when starting many,
+ Many, MANY concurrent netperf tests. Based on patches from Google.
+
*) Additional timing statistics will be kept by the omni tests when
the global "-j" option is specified. The additional statistics are
min, max, mean, stddev and the 50th, 90th and 99th percentiles on
- the timings measured by histograms.
+ the timings measured by histograms. Based on patches from Google.
*) Add a workaround to get Linux to report TX queue drops in a
UDP_STREAM test when the socket buffer size is larger than the
Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c 2010-09-14 19:55:36 UTC (rev 354)
+++ trunk/src/netsh.c 2010-09-14 21:51:26 UTC (rev 355)
@@ -94,7 +94,7 @@
/* Some of the args take optional parameters. Since we are using */
/* getopt to parse the command line, we will tell getopt that they do */
/* not take parms, and then look for them ourselves */
-#define GLOBAL_CMD_LINE_ARGS "A:a:b:B:CcdDf:F:H:hi:I:jk:K:l:L:n:NO:o:P:p:rt:T:v:VW:w:46"
+#define GLOBAL_CMD_LINE_ARGS "A:a:b:B:CcdDf:F:H:hi:I:jk:K:l:L:n:NO:o:P:p:rs:t:T:v:VW:w:46"
/************************************************************************/
/* */
@@ -188,6 +188,8 @@
remote_interval_usecs,
remote_interval_burst;
+int wait_time_secs;
+
#if defined(WANT_INTERVALS) || defined(WANT_DEMO)
int demo_mode; /* are we actually in demo mode? */
@@ -278,6 +280,7 @@
-p port,lport* Specify netserver port number and/or local port\n\
-P 0|1 Don't/Do display test headers\n\
-r Allow confidence to be hit on result only\n\
+ -s seconds Wait seconds between test setup and test start\n\
-t testname Specify test to perform\n\
-T lcpu,rcpu Request netperf/netserver be bound to local/remote cpu\n\
-v verbosity Specify the verbosity level\n\
@@ -517,6 +520,10 @@
remote_interval_usecs = 0;
remote_interval_burst = 0;
+/* wait time between control/data connection establishment and start
+ of data traffic */
+ wait_time_secs = 0;
+
#ifdef DIRTY
/* dirty and clean cache stuff */
loc_dirty_count = 0;
@@ -794,6 +801,11 @@
meaningful if cpu util is enabled */
result_confidence_only = 1;
break;
+ case 's':
+ /* the user wishes us to sleep/pause some length of time before
+ actually starting the test */
+ wait_time_secs = convert(optarg);
+ break;
case 't':
/* set the test name */
strcpy(test_name,optarg);
Modified: trunk/src/netsh.h
===================================================================
--- trunk/src/netsh.h 2010-09-14 19:55:36 UTC (rev 354)
+++ trunk/src/netsh.h 2010-09-14 21:51:26 UTC (rev 355)
@@ -96,6 +96,10 @@
test_bytes, /* test ends on byte count */
test_trans; /* test ends on tran count */
+/* wait time between control/data connection establishment and start
+ of data traffic */
+extern int wait_time_secs;
+
/* the alignment conditions for the tests */
extern int
local_recv_align, /* alignment for local receives */
Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c 2010-09-14 19:55:36 UTC (rev 354)
+++ trunk/src/nettest_omni.c 2010-09-14 21:51:26 UTC (rev 355)
@@ -112,6 +112,18 @@
#include "netsh.h"
#include "nettest_bsd.h"
+/* we only really use this once, but the initial patch to
+ src/nettest_bsd.c used it in several places. keep it as a macro
+ just for kicks and just in case we do end-up needing to use it
+ multiple times. */
+
+#define WAIT_BEFORE_DATA_TRAFFIC() \
+{ \
+ if (wait_time_secs) \
+ sleep(wait_time_secs); \
+} \
+
+
/* since someone can ask for latency stats, we will always include
this and to the other other things */
#include "hist.h"
@@ -4670,7 +4682,12 @@
some point even if we are a connectionless protocol, we may
still want to "connect" for convenience raj 2008-01-14 */
need_to_connect = (protocol != IPPROTO_UDP);
-
+
+ /* possibly wait just a moment before actually starting - used
+ mainly when one is doing many many many concurrent netperf
+ tests */
+ WAIT_BEFORE_DATA_TRAFFIC();
+
/* Set-up the test end conditions. For tests over a
"reliable/connection-oriented" transport (eg TCP, SCTP, etc) this
can be either time or byte/transaction count based. for
More information about the netperf-dev
mailing list