ndt-dev - [ndt-dev] [ndt] r1073 committed - Merged Issue136 into trunk
Subject: NDT-DEV email list created
List archive
- From:
- To:
- Subject: [ndt-dev] [ndt] r1073 committed - Merged Issue136 into trunk
- Date: Wed, 04 Jun 2014 10:51:20 +0000
Revision: 1073
Author:
Date: Wed Jun 4 10:51:11 2014 UTC
Log: Merged Issue136 into trunk
http://code.google.com/p/ndt/source/detail?r=1073
Modified:
/trunk
/trunk/Applet/src/edu/internet2/ndt/Tcpbw100.java
/trunk/src/web100-util.c
/trunk/src/web100clt.c
=======================================
--- /trunk/Applet/src/edu/internet2/ndt/Tcpbw100.java Wed May 28 11:17:18 2014 UTC
+++ /trunk/Applet/src/edu/internet2/ndt/Tcpbw100.java Wed Jun 4 10:51:11 2014 UTC
@@ -447,6 +447,11 @@
}
return result;
}
+
+ // get PC buffer imposed throughput limit
+ public String get_PcBuffSpdLimit() {
+ return Double.toString(rwin / rttsec);
+ }
// commenting out unused method, but not removing in case of future
use
/*
@@ -3806,8 +3811,8 @@
* to known values and writes out the specific results.
*
* server data is ordered as: Server IP; Client IP; CurrentMSS;
- * WinScaleSent; WinScaleRcvd; Client then adds Server IP; Client IP.
- *
+ * WinScaleSent; WinScaleRcvd; SumRTT; CountRTT; MaxRwinRcvd; Client then adds Server IP; Client IP.
+ *
* @param sMidBoxTestResParam
* String Middlebox results
*/
@@ -3830,6 +3835,14 @@
iWinsRecv = Integer.parseInt(JSONUtils.getValueFromJsonObj(sMidBoxTestResParam, "WinScaleRcvd"));
sClientSideServerIp = JSONUtils.getValueFromJsonObj(sMidBoxTestResParam, "ClientSideServerIp");
sClientSideClientIp = JSONUtils.getValueFromJsonObj(sMidBoxTestResParam, "ClientSideClientIp");
+ _iSumRTT = Integer.parseInt(JSONUtils.getValueFromJsonObj(sMidBoxTestResParam, "SumRTT"));
+ _iCountRTT = Integer.parseInt(JSONUtils.getValueFromJsonObj(sMidBoxTestResParam, "CountRTT"));
+ _iMaxRwinRcvd = Integer.parseInt(JSONUtils.getValueFromJsonObj(sMidBoxTestResParam, "MaxRwinRcvd"));
+
+ // calculate avgrtt and PC buffer imposed throughput limit
+ pub_avgrtt = (double) _iSumRTT / _iCountRTT;
+ rwin = _iMaxRwinRcvd * NDTConstants.EIGHT / NDTConstants.KILO_BITS / NDTConstants.KILO_BITS;
+ rttsec = pub_avgrtt / NDTConstants.KILO;
} else {
StringTokenizer tokens;
int k;
=======================================
--- /trunk/src/web100-util.c Wed May 28 11:17:18 2014 UTC
+++ /trunk/src/web100-util.c Wed Jun 4 10:51:11 2014 UTC
@@ -153,7 +153,7 @@
* @param cn pointer to the web100_connection
* @param results_keys pointer to string containing names of variables stored in results_values
* @param results_values pointer to string containing Server address , client address
- * currentMSS, WinScaleSent and WinScaleRecv values
+ * currentMSS, WinScaleSent, WinScaleRecv, SumRTT, CountRTT and MaxRwinRcvd values
*
*
*/
@@ -183,7 +183,7 @@
socklen_t saddr_size;
// middlebox test results
- static char vars[][255] = { "CurMSS", "WinScaleSent", "WinScaleRcvd", };
+ static char vars[][255] = {"WinScaleSent", "WinScaleRcvd", "SumRTT", "CountRTT", "MaxRwinRcvd" };
assert(results_keys);
assert(results_values);
@@ -242,44 +242,35 @@
strlcat(results_keys, ";", results_keys_strlen);
strlcat(results_values, line, results_strlen);
- // get web100 values for the middlebox test result group
- for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
+ // get current MSS value
#if USE_WEB100
- // read web100_group and web100_var of vars[i] into group and var
- web100_agent_find_var_and_group(agent, vars[i], &group, &var);
+ // read web100_group and web100_var of CurMSS into group and var
+ web100_agent_find_var_and_group(agent, "CurMSS", &group, &var);
// read variable value from web100 connection
web100_raw_read(var, cn, buff);
// get current MSS in textual format and append to results
// get current MSS value and append to "results"
- if (strcmp(vars[i], "CurMSS") == 0)
currentMSSval = atoi(
web100_value_to_text(web100_get_var_type(var), buff));
snprintf(line, sizeof(line), "%s;",
web100_value_to_text(web100_get_var_type(var), buff));
#elif USE_WEB10G
int type;
- type = web10g_get_val(agent, cn, vars[i], &value);
+ type = web10g_get_val(agent, cn, "CurMSS", &value);
if (type == -1) {
- log_println(0, "Middlebox: Failed to read the value of %s", vars[i]);
+ log_println(0, "Middlebox: Failed to read the value of CurMSS");
return;
} else {
- if (strcmp(vars[i], "CurMSS") == 0)
currentMSSval = value.uv32;
snprintf(line, sizeof(line), "%u;", value.uv32);
}
#endif
- if (strcmp(line, "4294967295;") == 0)
- snprintf(line, sizeof(line), "%d;", -1);
+ strlcat(results_keys, "CurMSS;", results_keys_strlen);
+ strlcat(results_values, line, results_strlen);
- // strlcat(results, line, sizeof(results));
- strlcat(results_keys, vars[i], results_keys_strlen);
- strlcat(results_keys, ";", results_keys_strlen);
- strlcat(results_values, line, results_strlen);
- log_print(3, "%s", line);
- }
log_println(3, "");
log_println(0, "Sending %d Byte packets over the network, and data=%s",
currentMSSval, line);
@@ -375,6 +366,38 @@
if (k < 0) // general error writing to socket. quit
break;
}
+
+ // get web100 values for the middlebox test result group
+ for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
+#if USE_WEB100
+ // read web100_group and web100_var of vars[i] into group and var
+ web100_agent_find_var_and_group(agent, vars[i], &group, &var);
+ // read variable value from web100 connection
+ web100_raw_read(var, cn, buff);
+
+ snprintf(line, sizeof(line), "%s;",
+ web100_value_to_text(web100_get_var_type(var), buff));
+#elif USE_WEB10G
+ int type;
+ type = web10g_get_val(agent, cn, vars[i], &value);
+ if (type == -1) {
+ log_println(0, "Middlebox: Failed to read the value of %s", vars[i]);
+ return;
+ } else {
+ snprintf(line, sizeof(line), "%u;", value.uv32);
+ }
+#endif
+
+ if (strcmp(line, "4294967295;") == 0)
+ snprintf(line, sizeof(line), "%d;", -1);
+
+ // strlcat(results, line, sizeof(results));
+ strlcat(results_keys, vars[i], results_keys_strlen);
+ strlcat(results_keys, ";", results_keys_strlen);
+ strlcat(results_values, line, results_strlen);
+ log_print(3, "%s", line);
+ }
+
#if USE_WEB100
log_println(5, "Finished with web100_middlebox() routine snap-0x%x, "
=======================================
--- /trunk/src/web100clt.c Wed May 28 11:17:18 2014 UTC
+++ /trunk/src/web100clt.c Wed Jun 4 10:51:11 2014 UTC
@@ -253,6 +253,7 @@
*
* Server data is first.
* order is Server IP; Client IP; CurrentMSS; WinScaleRcvd; WinScaleSent;
+ * SumRTT; CountRTT; MaxRwinRcvd;
* Client then adds
* Server IP; Client IP.
* @param midresult_str String containing test results
- [ndt-dev] [ndt] r1073 committed - Merged Issue136 into trunk, ndt, 06/04/2014
Archive powered by MHonArc 2.6.16.