Create all of our arrays and do it somewhere sensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3069 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ConMgrStats.java,v 1.3 2004/08/04 03:30:12 mdb Exp $
|
||||
// $Id: ConMgrStats.java,v 1.4 2004/08/04 03:32:17 mdb Exp $
|
||||
|
||||
package com.threerings.presents.data;
|
||||
|
||||
@@ -37,6 +37,19 @@ public class ConMgrStats implements Streamable
|
||||
/** The number of messages written. */
|
||||
public int[] msgsOut;
|
||||
|
||||
/** Creates our historical arrays. */
|
||||
public void init ()
|
||||
{
|
||||
authQueueSize = new int[60];
|
||||
deathQueueSize = new int[60];
|
||||
outQueueSize = new int[60];
|
||||
overQueueSize = new int[60];
|
||||
bytesIn = new int[60];
|
||||
bytesOut = new int[60];
|
||||
msgsIn = new int[60];
|
||||
msgsOut = new int[60];
|
||||
}
|
||||
|
||||
/** Advances the currently accumulating bucket and clears its
|
||||
* previous contents. */
|
||||
public void increment ()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ConnectionManager.java,v 1.41 2004/08/04 02:36:56 mdb Exp $
|
||||
// $Id: ConnectionManager.java,v 1.42 2004/08/04 03:32:18 mdb Exp $
|
||||
|
||||
package com.threerings.presents.server.net;
|
||||
|
||||
@@ -56,12 +56,7 @@ public class ConnectionManager extends LoopingThread
|
||||
|
||||
// create our stats record
|
||||
_stats = new ConMgrStats();
|
||||
_stats.outQueueSize = new int[60];
|
||||
_stats.overQueueSize = new int[60];
|
||||
_stats.bytesIn = new int[60];
|
||||
_stats.bytesOut = new int[60];
|
||||
_stats.msgsIn = new int[60];
|
||||
_stats.msgsOut = new int[60];
|
||||
_stats.init();
|
||||
|
||||
// register as a "state of server" reporter
|
||||
PresentsServer.registerReporter(this);
|
||||
|
||||
Reference in New Issue
Block a user