Accept and honor the reset parameter.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4220 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2006-06-25 23:09:19 +00:00
parent 012549d177
commit d40435b221
2 changed files with 14 additions and 6 deletions
@@ -386,7 +386,8 @@ public class ClientManager
} }
// documentation inherited from interface PresentsServer.Reporter // documentation inherited from interface PresentsServer.Reporter
public void appendReport (StringBuilder report, long now, long sinceLast) public void appendReport (
StringBuilder report, long now, long sinceLast, boolean reset)
{ {
report.append("* presents.ClientManager:\n"); report.append("* presents.ClientManager:\n");
report.append("- Sessions: "); report.append("- Sessions: ");
@@ -202,14 +202,21 @@ public class ConnectionManager extends LoopingThread
} }
// documentation inherited from interface PresentsServer.Reporter // documentation inherited from interface PresentsServer.Reporter
public void appendReport (StringBuilder report, long now, long sinceLast) public void appendReport (
StringBuilder report, long now, long sinceLast, boolean reset)
{ {
long bytesIn, bytesOut, msgsIn, msgsOut; long bytesIn, bytesOut, msgsIn, msgsOut;
synchronized (this) { synchronized (this) {
bytesIn = _bytesIn; _bytesIn = 0L; bytesIn = _bytesIn;
bytesOut = _bytesOut; _bytesOut = 0L; bytesOut = _bytesOut;
msgsIn = _msgsIn; _msgsIn = 0; msgsIn = _msgsIn;
msgsOut = _msgsOut; _msgsOut = 0; msgsOut = _msgsOut;
if (reset) {
_bytesIn = 0L;
_bytesOut = 0L;
_msgsIn = 0;
_msgsOut = 0;
}
} }
report.append("* presents.net.ConnectionManager:\n"); report.append("* presents.net.ConnectionManager:\n");