Track and report some connection manager stats over a short historical
period so that we can see what sort of funny business is going on with the network thread when the process spikes up to 100% CPU. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3066 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// $Id: ConMgrStats.java,v 1.1 2004/08/04 02:31:18 mdb Exp $
|
||||
|
||||
package com.threerings.presents.data;
|
||||
|
||||
import com.threerings.io.Streamable;
|
||||
|
||||
/**
|
||||
* Used to track and report stats on the connection manager.
|
||||
*/
|
||||
public class ConMgrStats implements Streamable
|
||||
{
|
||||
/** The current index into the history arrays. */
|
||||
public int current;
|
||||
|
||||
/** The outgoing queue size. */
|
||||
public int[] outQueueSize;
|
||||
|
||||
/** The overflow queue size. */
|
||||
public int[] overQueueSize;
|
||||
|
||||
/** The number of bytes read. */
|
||||
public int[] bytesIn;
|
||||
|
||||
/** The number of bytes written. */
|
||||
public int[] bytesOut;
|
||||
|
||||
/** The number of messages read. */
|
||||
public int[] msgsIn;
|
||||
|
||||
/** The number of messages written. */
|
||||
public int[] msgsOut;
|
||||
|
||||
/** Advances the currently accumulating bucket and clears its
|
||||
* previous contents. */
|
||||
public void increment ()
|
||||
{
|
||||
current++;
|
||||
outQueueSize[current] = 0;
|
||||
overQueueSize[current] = 0;
|
||||
bytesIn[current] = 0;
|
||||
bytesOut[current] = 0;
|
||||
msgsIn[current] = 0;
|
||||
msgsOut[current] = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user