[netperf-dev] netperf2 commit notice r617 - in trunk: . src
raj at netperf.org
raj at netperf.org
Wed Dec 5 16:19:43 PST 2012
Author: raj
Date: 2012-12-05 16:19:42 -0800 (Wed, 05 Dec 2012)
New Revision: 617
Modified:
trunk/AUTHORS
trunk/Release_Notes
trunk/src/netlib.c
Log:
allow bits per second and bytes per second as selectable throughput units
Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS 2012-12-06 00:09:15 UTC (rev 616)
+++ trunk/AUTHORS 2012-12-06 00:19:42 UTC (rev 617)
@@ -285,3 +285,5 @@
Jim Nell - Fix for Solaris 11.1 compilation problem in dscp.c
+Steven Noonan - found a variable name bug for the ever unlikely case
+of a platform not defining SO_SNDBUF
Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes 2012-12-06 00:09:15 UTC (rev 616)
+++ trunk/Release_Notes 2012-12-06 00:19:42 UTC (rev 617)
@@ -1,3 +1,9 @@
+These are the Release Notes for post Revision 2.6.0 of netperf:
+
+*) Add bits/s (-f b) and Bytes/s (-f B) as selectable throughput
+ units. This may make life easier for folks doing post-processing of
+ things like interim results.
+
These are the Release Notes for Revision 2.6.0 of netperf:
*) Initial pass at support for --enable-intervals (WANT_INTERVALS) for
Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c 2012-12-06 00:09:15 UTC (rev 616)
+++ trunk/src/netlib.c 2012-12-06 00:19:42 UTC (rev 617)
@@ -2027,6 +2027,9 @@
static char fmtbuf[64];
switch (libfmt) {
+ case 'B':
+ snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f" , number);
+ break;
case 'K':
snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f" , number / 1024.0);
break;
@@ -2036,6 +2039,9 @@
case 'G':
snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number / 1024.0 / 1024.0 / 1024.0);
break;
+ case 'b':
+ snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f" , number * 8);
+ break;
case 'k':
snprintf(fmtbuf, sizeof(fmtbuf), "%-7.2f", number * 8 / 1000.0);
break;
@@ -2117,6 +2123,9 @@
static char unitbuf[64];
switch (libfmt) {
+ case 'B':
+ strcpy(unitbuf, "Bytes");
+ break;
case 'K':
strcpy(unitbuf, "KBytes");
break;
@@ -2126,6 +2135,9 @@
case 'G':
strcpy(unitbuf, "GBytes");
break;
+ case 'b':
+ strcpy(unitbuf, "10^0bits");
+ break;
case 'k':
strcpy(unitbuf, "10^3bits");
break;
@@ -3599,6 +3611,8 @@
divisor = 1000.0 * 1000.0 * 1000.0 / 8.0;
break;
case 'x':
+ case 'b':
+ case 'B':
divisor = 1.0;
break;
@@ -3649,6 +3663,8 @@
divisor = 1000.0 * 1000.0 * 1000.0 / 8.0;
break;
case 'x':
+ case 'b':
+ case 'B':
divisor = 1.0;
break;
More information about the netperf-dev
mailing list