[netperf-dev] netperf2 commit notice r384 - in trunk: . src
raj at netperf.org
raj at netperf.org
Wed Jan 26 14:32:20 PST 2011
Author: raj
Date: 2011-01-26 14:32:19 -0800 (Wed, 26 Jan 2011)
New Revision: 384
Modified:
trunk/Release_Notes
trunk/src/nettest_omni.c
Log:
first pass at default omni output based on test
Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes 2011-01-26 20:43:16 UTC (rev 383)
+++ trunk/Release_Notes 2011-01-26 22:32:19 UTC (rev 384)
@@ -1,5 +1,12 @@
These are the Release Notes for post-revision 2.4.5 of netperf:
+*) When ./configured with --enable-intervals and intervals are
+ actually used, the round-trip latency reported by an omni (or
+ migrated classic) request/response test should better reflect
+ reality rather than the length of the pacing interval. It and the
+ mean_latency from the histogram will still differ slightly and
+ probably always will.
+
*) The histogram code has been enhanced to track more than one latency
at a time and so --enable-histogram and --enable-burst are now
compatible - for the omni tests or migrated "classic" tests only
Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c 2011-01-26 20:43:16 UTC (rev 383)
+++ trunk/src/nettest_omni.c 2011-01-26 22:32:19 UTC (rev 384)
@@ -1537,9 +1537,9 @@
}
else {
output_list[line][j] = name;
+ j++;
}
- j++;
token = strtok(NULL," ,");
}
if ((token) && (debug)) {
@@ -1602,7 +1602,55 @@
}
+/* building blocks for output selection */
+#define NETPERF_TPUT "ELAPSED_TIME,THROUGHPUT,THROUGHPUT_UNITS"
+#define NETPERF_OUTPUT_STREAM "LSS_SIZE_END,LSS_SIZE_END,LOCAL_SEND_SIZE"
+#define NETPERF_OUTPUT_MAERTS "RSS_SIZE_END,LSR_SIZE_END,REMOTE_SEND_SIZE"
+#define NETPERF_CPU "LOCAL_CPU,LOCAL_CPU_METHOD,REMOTE_CPU_UTIL,REMOTE_CPU_METHOD,LOCAL_SD,REMOTE_SD,SD_UNITS"
+#define NETPERF_RR "LSS_SIZE_END,LSR_SIZE_END,RSR_SIZE_END,RSS_SIZE_END,REQUEST_SIZE,RESPONSE_SIZE"
+
void
+set_output_list_by_test() {
+
+ char *stream_no_cpu = NETPERF_OUTPUT_STREAM "," NETPERF_TPUT;
+ char *stream_cpu = NETPERF_OUTPUT_STREAM "," NETPERF_TPUT "," NETPERF_CPU;
+ char *maerts_no_cpu = NETPERF_OUTPUT_MAERTS "," NETPERF_TPUT;
+ char *maerts_cpu = NETPERF_OUTPUT_MAERTS "," NETPERF_TPUT "," NETPERF_CPU;
+ char *rr_no_cpu = NETPERF_RR "," NETPERF_TPUT;
+ char *rr_cpu = NETPERF_RR "," NETPERF_TPUT "," NETPERF_CPU;
+
+
+ if (NETPERF_XMIT_ONLY(direction)) {
+ if (!(local_cpu_usage || remote_cpu_usage))
+ parse_output_selection_direct(stream_no_cpu);
+ else
+ parse_output_selection_direct(stream_cpu);
+ }
+ else if (NETPERF_RECV_ONLY(direction)) {
+ if (!(local_cpu_usage || remote_cpu_usage))
+ parse_output_selection_direct(maerts_no_cpu);
+ else
+ parse_output_selection_direct(maerts_cpu);
+ }
+ else if (NETPERF_CC(direction)) {
+ }
+ else if (NETPERF_IS_RR(direction)) {
+ if (!(local_cpu_usage || remote_cpu_usage))
+ parse_output_selection_direct(rr_no_cpu);
+ else
+ parse_output_selection_direct(rr_cpu);
+ }
+ else {
+ /* no idea */
+ if (debug) {
+ fprintf(where,"Cannot determine default test output, using mins\n");
+ fflush(where);
+ }
+ parse_output_selection_direct(NETPERF_TPUT "," NETPERF_CPU);
+ }
+}
+
+void
parse_output_selection(char *output_selection) {
/* is it the magic keyword? */
@@ -1632,7 +1680,7 @@
int i;
/* belts and suspenders everyone... */
- for (i = OUTPUT_NONE; i < NETPERF_OUTPUT_MAX; i++) {
+ for (i = NETPERF_OUTPUT_UNKNOWN; i < NETPERF_OUTPUT_MAX; i++) {
netperf_output_source[i].output_name = i;
netperf_output_source[i].max_line_len = 0;
netperf_output_source[i].tot_line_len = 0;
@@ -1648,6 +1696,9 @@
netperf_output_source[OUTPUT_NONE].output_name = OUTPUT_NONE;
netperf_output_source[OUTPUT_NONE].line[0] = " ";
+ netperf_output_source[OUTPUT_NONE].line[1] = "";
+ netperf_output_source[OUTPUT_NONE].line[2] = "";
+ netperf_output_source[OUTPUT_NONE].line[3] = "";
netperf_output_source[OUTPUT_NONE].format = "%s";
netperf_output_source[OUTPUT_NONE].display_value = &" ";
netperf_output_source[OUTPUT_NONE].max_line_len =
@@ -3585,7 +3636,7 @@
parse_output_selection(output_selection_spec);
}
else {
- set_output_list_all();
+ set_output_list_by_test();
}
}
@@ -7879,6 +7930,7 @@
zero, let us see if it needs to be set to something else. */
if ((0 == direction) && (!connection_test)) direction = NETPERF_XMIT;
direction_str = direction_to_str(direction);
+
/* some other sanity checks we need to make would include stuff when
the user has set -m and -M such that both XMIT and RECV are set
and has not set -r. initially we will not allow that. at some
@@ -7890,6 +7942,14 @@
if (verbosity > 1) keep_histogram = 1;
#endif
+ /* did the user use -d 6 but not set -r? */
+ if (NETPERF_IS_RR(direction) && !NETPERF_CC(direction)) {
+ if (req_size == -1)
+ req_size = 1;
+ if (rsp_size == -1)
+ rsp_size = 1;
+ }
+
/* ok, time to sanity check the output units */
if ('?' == libfmt) {
/* if this is a RR test then set it to 'x' for transactions */
More information about the netperf-dev
mailing list