Console: Swap some columns on ssu /peers for consistency

Format send window and slow start threshold values
This commit is contained in:
zzz
2020-12-05 12:56:58 +00:00
parent df43e72a08
commit 58020b4b58
2 changed files with 29 additions and 32 deletions

View File

@@ -266,12 +266,12 @@ public class PeerHelper extends HelperBase {
.append("<tr><td><b id=\"def.rtt\">RTT</b></td><td>").append(_t("The round trip time in milliseconds")).append("</td></tr>\n")
//.append("<tr><td><b id=\"def.dev\">").append(_t("Dev")).append("</b></td><td>").append(_t("The standard deviation of the round trip time in milliseconds")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.rto\">RTO</b></td><td>").append(_t("The retransmit timeout in milliseconds")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.mtu\">MTU</b></td><td>").append(_t("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("</td></tr>\n");
.append("<tr><td><b id=\"def.mtu\">MTU</b></td><td>").append(_t("Maximum receive / send packet size (bytes)")).append("</td></tr>\n");
}
buf.append("<tr><td><b id=\"def.send\">").append(_t("TX")).append("</b></td><td>").append(_t("The total number of messages sent to the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.recv\">").append(_t("RX")).append("</b></td><td>").append(_t("The total number of messages received from the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.resent\">").append(_t("Dup TX")).append("</b></td><td>").append(_t("The total number of packets retransmitted to the peer")).append("</td></tr>\n")
buf.append("<tr><td><b id=\"def.recv\">").append(_t("RX")).append("</b></td><td>").append(_t("The total number of messages received from the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.send\">").append(_t("TX")).append("</b></td><td>").append(_t("The total number of messages sent to the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.dupRecv\">").append(_t("Dup RX")).append("</b></td><td>").append(_t("The total number of duplicate packets received from the peer")).append("</td></tr>\n")
.append("<tr><td><b id=\"def.resent\">").append(_t("Dup TX")).append("</b></td><td>").append(_t("The total number of packets retransmitted to the peer")).append("</td></tr>\n")
.append("</table>");
return buf.toString();
}
@@ -318,8 +318,8 @@ public class PeerHelper extends HelperBase {
"<th align=\"right\"><a href=\"#def.rate\">").append(_t("In/Out")).append("</a></th>" +
"<th align=\"right\"><a href=\"#def.up\">").append(_t("Up")).append("</a></th>" +
"<th align=\"right\"><a href=\"#def.skew\">").append(_t("Skew")).append("</a></th>" +
"<th align=\"right\"><a href=\"#def.send\">").append(_t("TX")).append("</a></th>" +
"<th align=\"right\"><a href=\"#def.recv\">").append(_t("RX")).append("</a></th>" +
"<th align=\"right\"><a href=\"#def.send\">").append(_t("TX")).append("</a></th>" +
"<th>").append(_t("Out Queue")).append("</th>" +
"<th title=\"").append(_t("Is peer backlogged?")).append("\">").append(_t("Backlogged?")).append("</th>" +
//"<th>").append(_t("Reading?")).append("</th>" +
@@ -368,10 +368,10 @@ public class PeerHelper extends HelperBase {
totalUptime += con.getUptime();
offsetTotal = offsetTotal + con.getClockSkew();
buf.append("</td><td class=\"cells\" align=\"right\">").append(DataHelper.formatDuration2(1000 * con.getClockSkew()));
buf.append("</td><td class=\"cells\" align=\"right\">").append(con.getMessagesSent());
totalSend += con.getMessagesSent();
buf.append("</td><td class=\"cells\" align=\"right\">").append(con.getMessagesReceived());
totalRecv += con.getMessagesReceived();
buf.append("</td><td class=\"cells\" align=\"right\">").append(con.getMessagesSent());
totalSend += con.getMessagesSent();
long outQueue = con.getOutboundQueueSize();
buf.append("</td><td class=\"cells\" align=\"center\">").append(outQueue);
buf.append("</td><td class=\"cells\" align=\"center\">");
@@ -398,7 +398,7 @@ public class PeerHelper extends HelperBase {
buf.append(THINSP).append("<span class=\"left\"><b>").append(formatRate(bpsSend/1000)).append("</b></span>");
buf.append("</td><td align=\"right\"><b>").append(DataHelper.formatDuration2(totalUptime/peers.size()));
buf.append("</b></td><td align=\"right\"><b>").append(DataHelper.formatDuration2(offsetTotal*1000/peers.size()));
buf.append("</b></td><td align=\"right\"><b>").append(totalSend).append("</b></td><td align=\"right\"><b>").append(totalRecv);
buf.append("</b></td><td align=\"right\"><b>").append(totalRecv).append("</b></td><td align=\"right\"><b>").append(totalSend);
buf.append("</b></td><td>&nbsp;</td><td>&nbsp;</td></tr>\n");
}
@@ -511,15 +511,15 @@ public class PeerHelper extends HelperBase {
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by outbound maximum transmit unit"), FLAG_MTU);
buf.append("</th>");
}
buf.append("<th nowrap><span class=\"peersort\"><a href=\"#def.send\">").append(_t("TX")).append("</a><br>");
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets sent"), FLAG_SEND);
buf.append("</span></th><th nowrap><span class=\"peersort\"><a href=\"#def.recv\">").append(_t("RX")).append("</a><br>");
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets received"), FLAG_RECV);
buf.append("<th nowrap><span class=\"peersort\"><a href=\"#def.send\">").append(_t("TX")).append("</a><br>");
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets sent"), FLAG_SEND);
buf.append("</span></th>\n");
buf.append("<th nowrap><span class=\"peersort\"><a href=\"#def.resent\">").append(_t("Dup TX")).append("</a><br>");
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets retransmitted"), FLAG_RESEND);
buf.append("</span></th><th nowrap><span class=\"peersort\"><a href=\"#def.dupRecv\">").append(_t("Dup RX")).append("</a><br>");
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets received more than once"), FLAG_DUP);
buf.append("<th nowrap><span class=\"peersort\"><a href=\"#def.resent\">").append(_t("Dup TX")).append("</a><br>");
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets retransmitted"), FLAG_RESEND);
buf.append("</span></th></tr>\n");
out.write(buf.toString());
buf.setLength(0);
@@ -610,24 +610,25 @@ public class PeerHelper extends HelperBase {
buf.append("</td>");
offsetTotal = offsetTotal + skew;
long sendWindow = peer.getSendWindowBytes();
int rtt = 0;
int rto = 0;
if (isAdvanced) {
int sendWindow = peer.getSendWindowBytes();
cwinTotal += sendWindow;
buf.append("<td class=\"cells cwnd\" align=\"center\"><span class=\"right\">");
buf.append(sendWindow/1024);
buf.append("K");
buf.append(DataHelper.formatSize2(sendWindow));
buf.append("B");
buf.append("</span>").append(THINSP).append("<span class=\"right\">").append(peer.getConcurrentSends());
buf.append("</span>").append(THINSP).append("<span class=\"right\">").append(peer.getConcurrentSendWindow());
buf.append("</span>").append(THINSP).append("<span class=\"left\">").append(peer.getConsecutiveSendRejections());
buf.append("</span>");
if (peer.isBacklogged())
buf.append(' ').append(_t("backlogged"));
buf.append("</span></td>");
buf.append("<br><i>").append(_t("backlogged")).append("</i>");
buf.append("</td>");
buf.append("<td class=\"cells\" align=\"right\">");
buf.append(peer.getSlowStartThreshold()/1024);
buf.append("K</td>");
buf.append(DataHelper.formatSize2(peer.getSlowStartThreshold()));
buf.append("B</td>");
rtt = peer.getRTT();
rto = peer.getRTO();
@@ -648,12 +649,9 @@ public class PeerHelper extends HelperBase {
buf.append("</td>");
buf.append("<td class=\"cells\" align=\"center\"><span class=\"right\">");
buf.append(peer.getMTU()).append("</span>").append(THINSP);
buf.append("<span class=\"left\">").append(peer.getReceiveMTU());
buf.append(peer.getReceiveMTU()).append("</span>").append(THINSP);
buf.append("<span class=\"left\">").append(peer.getMTU());
//.append('/');
//buf.append(peer.getMTUIncreases()).append('/');
//buf.append(peer.getMTUDecreases());
buf.append("</span></td>");
}
@@ -661,11 +659,11 @@ public class PeerHelper extends HelperBase {
long recv = peer.getMessagesReceived();
buf.append("<td class=\"cells\" align=\"right\">");
buf.append(sent);
buf.append(recv);
buf.append("</td>");
buf.append("<td class=\"cells\" align=\"right\">");
buf.append(recv);
buf.append(sent);
buf.append("</td>");
//double sent = (double)peer.getPacketsPeriodTransmitted();
@@ -694,7 +692,6 @@ public class PeerHelper extends HelperBase {
bpsOut += sendBps;
uptimeMsTotal += uptime;
cwinTotal += sendWindow;
if (rtt > 0) {
rttTotal += rtt;
numRTTPeers++;
@@ -737,9 +734,9 @@ public class PeerHelper extends HelperBase {
buf.append("</b></td><td align=\"center\"><b>").append(ut.getMTU(false)).append("</b></td>");
}
buf.append("<td align=\"right\"><b>");
buf.append(sendTotal).append("</b></td><td align=\"right\"><b>").append(recvTotal).append("</b></td>\n" +
"<td align=\"right\"><b>").append(resentTotal);
buf.append("</b></td><td align=\"right\"><b>").append(dupRecvTotal).append("</b></td></tr>\n");
buf.append(recvTotal).append("</b></td><td align=\"right\"><b>").append(sendTotal).append("</b></td>\n" +
"<td align=\"right\"><b>").append(dupRecvTotal);
buf.append("</b></td><td align=\"right\"><b>").append(resentTotal).append("</b></td></tr>\n");
/****
if (sortFlags == FLAG_DEBUG) {
buf.append("<tr><td colspan=\"16\">");

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 0;
public final static long BUILD = 1;
/** for example "-test" */
public final static String EXTRA = "";