Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1217 committed - Merge Issue172 into trunk

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1217 committed - Merge Issue172 into trunk


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1217 committed - Merge Issue172 into trunk
  • Date: Fri, 20 Mar 2015 12:27:18 +0000

Revision: 1217
Author:

Date: Fri Mar 20 12:27:04 2015 UTC
Log: Merge Issue172 into trunk

https://code.google.com/p/ndt/source/detail?r=1217

Modified:
/trunk
/trunk/HTML5-frontend/script.js

=======================================
--- /trunk/HTML5-frontend/script.js Fri Mar 20 12:14:29 2015 UTC
+++ /trunk/HTML5-frontend/script.js Fri Mar 20 12:27:04 2015 UTC
@@ -99,6 +99,10 @@
setPhase(PHASE_RESULTS);
return true;
}
+ if (message.match(/failed/) && currentPhase < PHASE_RESULTS) {
+ setPhase(PHASE_RESULTS);
+ return false;
+ }
if (currentStatus.match(/Outbound/) && currentPhase < PHASE_UPLOAD) {
setPhase(PHASE_UPLOAD);
}
@@ -375,7 +379,9 @@
);
txt = txt + "=== Results sent by the server ===";
div.innerHTML = txt;
- div.appendChild(table);
+ if (isTable) {
+ div.appendChild(table);
+ }

return div;
}
@@ -454,50 +460,64 @@
document.getElementById('upload-speed-units').innerHTML = 'mb/s';
}
}
+
+function readNDTvar(variable) {
+ var ret = testNDT().getNDTvar(variable);
+ return !ret ? "-" : ret;
+}

function testDetails() {
if (simulate) return 'Test details';

- var a = testNDT();
var d = '';

- d += "Your system: " + a.getNDTvar("OperatingSystem").bold() + "<br>";
- d += "Plugin version: " + (a.getNDTvar("PluginVersion") + " (" + a.getNDTvar("OsArchitecture") + ")<br>").bold();
+ var errorMsg = testError();
+ if (errorMsg.match(/failed/)) {
+ d += "Error occured while performing test: <br>".bold();
+ if (errorMsg.match(/#2048/)) {
+ d += "Security error. This error may be caused by firewall issues, make sure that port 843 is available on the NDT server, and that you can access it.".bold().fontcolor("red") + "<br><br>";
+ } else {
+ d += errorMsg.bold().fontcolor("red") + "<br><br>";
+ }
+ }
+
+ d += "Your system: " + readNDTvar("OperatingSystem").bold() + "<br>";
+ d += "Plugin version: " + (readNDTvar("PluginVersion") + " (" + readNDTvar("OsArchitecture") + ")<br>").bold();

d += "<br>";

- d += "TCP receive window: " + a.getNDTvar("CurRwinRcvd").bold() + " current, " + a.getNDTvar("MaxRwinRcvd").bold() + " maximum<br>";
+ d += "TCP receive window: " + readNDTvar("CurRwinRcvd").bold() + " current, " + readNDTvar("MaxRwinRcvd").bold() + " maximum<br>";
d += "<b>" + printPacketLoss() + "</b> % of packets lost during test<br>";
- d += "Round trip time: " + a.getNDTvar("MinRTT").bold() + " msec (minimum), " + a.getNDTvar("MaxRTT").bold() + " msec (maximum), <b>" + Math.round(averageRoundTrip()) + "</b> msec (average)<br>";
+ d += "Round trip time: " + readNDTvar("MinRTT").bold() + " msec (minimum), " + readNDTvar("MaxRTT").bold() + " msec (maximum), <b>" + Math.round(averageRoundTrip()) + "</b> msec (average)<br>";
d += "Jitter: " + printJitter(true) + "<br>";
- d += a.getNDTvar("waitsec").bold() + " seconds spend waiting following a timeout<br>";
- d += "TCP time-out counter: " + a.getNDTvar("CurRTO").bold() + "<br>";
- d += a.getNDTvar("SACKsRcvd").bold() + " selective acknowledgement packets received<br>";
+ d += readNDTvar("waitsec").bold() + " seconds spend waiting following a timeout<br>";
+ d += "TCP time-out counter: " + readNDTvar("CurRTO").bold() + "<br>";
+ d += readNDTvar("SACKsRcvd").bold() + " selective acknowledgement packets received<br>";

d += "<br>";

- if (a.getNDTvar("mismatch") == "yes") {
+ if (readNDTvar("mismatch") == "yes") {
d += "A duplex mismatch condition was detected.<br>".fontcolor("red").bold();
}
else {
d += "No duplex mismatch condition was detected.<br>".fontcolor("green");
}

- if (a.getNDTvar("bad_cable") == "yes") {
+ if (readNDTvar("bad_cable") == "yes") {
d += "The test detected a cable fault.<br>".fontcolor("red").bold();
}
else {
d += "The test did not detect a cable fault.<br>".fontcolor("green");
}

- if (a.getNDTvar("congestion") == "yes") {
+ if (readNDTvar("congestion") == "yes") {
d += "Network congestion may be limiting the connection.<br>".fontcolor("red").bold();
}
else {
d += "No network congestion was detected.<br>".fontcolor("green");
}

- /*if (a.get_natStatus() == "yes") {
+ /*if (testNDT().get_natStatus() == "yes") {
d += "A network address translation appliance was detected.<br>";
}
else {
@@ -506,11 +526,11 @@

d += "<br>";

- d += a.getNDTvar("cwndtime").bold() + "% of the time was not spent in a receiver limited or sender limited state.<br>";
- d += a.getNDTvar("rwintime").bold() + "% of the time the connection is limited by the client machine's receive buffer.<br>";
- d += "Optimal receive buffer: " + a.getNDTvar("optimalRcvrBuffer").bold() + " bytes<br>";
- d += "Bottleneck link: " + a.getNDTvar("accessTech").bold() + "<br>";
- d += a.getNDTvar("DupAcksIn").bold() + " duplicate ACKs set<br>";
+ d += readNDTvar("cwndtime").bold() + "% of the time was not spent in a receiver limited or sender limited state.<br>";
+ d += readNDTvar("rwintime").bold() + "% of the time the connection is limited by the client machine's receive buffer.<br>";
+ d += "Optimal receive buffer: " + readNDTvar("optimalRcvrBuffer").bold() + " bytes<br>";
+ d += "Bottleneck link: " + readNDTvar("accessTech").bold() + "<br>";
+ d += readNDTvar("DupAcksIn").bold() + " duplicate ACKs set<br>";

return d;
}


  • [ndt-dev] [ndt] r1217 committed - Merge Issue172 into trunk, ndt, 03/20/2015

Archive powered by MHonArc 2.6.16.

Top of Page