Record our queue size once every five minutes, and do it using a nice
happy constant. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3595 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -238,16 +238,16 @@ public class PresentsDObjectMgr
|
|||||||
_maxQueueSize = queueSize;
|
_maxQueueSize = queueSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// report and reset our largest queue size once per minute
|
// report and reset our largest queue size once every 5 minutes
|
||||||
long startMillis = start * 1000 / freq;
|
long startMillis = start * 1000 / freq;
|
||||||
if (_nextQueueReport < startMillis) {
|
if (_nextQueueReport < startMillis) {
|
||||||
if (_nextQueueReport != 0L) {
|
if (_nextQueueReport != 0L) {
|
||||||
_statslog.log("max_dobj_queue_size " + _maxQueueSize);
|
_statslog.log("max_dobj_queue_size " + _maxQueueSize);
|
||||||
_maxQueueSize = queueSize;
|
_maxQueueSize = queueSize;
|
||||||
_nextQueueReport += 60 * 1000L;
|
_nextQueueReport += QUEUE_PROFILING_INTERVAL;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_nextQueueReport = startMillis + 60 * 1000L;
|
_nextQueueReport = startMillis + QUEUE_PROFILING_INTERVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1016,6 +1016,9 @@ public class PresentsDObjectMgr
|
|||||||
/** The default size of an oid list refs vector. */
|
/** The default size of an oid list refs vector. */
|
||||||
protected static final int DEFREFVEC_SIZE = 4;
|
protected static final int DEFREFVEC_SIZE = 4;
|
||||||
|
|
||||||
|
/** The frequency with which we report maximum queue size. */
|
||||||
|
protected static final long QUEUE_PROFILING_INTERVAL = 5 * 60 * 1000L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This table maps event classes to helper methods that perform some
|
* This table maps event classes to helper methods that perform some
|
||||||
* additional processing for particular events.
|
* additional processing for particular events.
|
||||||
|
|||||||
@@ -98,15 +98,17 @@ public class PresentsInvoker extends Invoker
|
|||||||
_maxQueueSize = queueSize;
|
_maxQueueSize = queueSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// report and reset our largest queue size once per minute
|
// report and reset our largest queue size once every 5 minutes
|
||||||
if (_nextQueueReport < start) {
|
if (_nextQueueReport < start) {
|
||||||
if (_nextQueueReport != 0L) {
|
if (_nextQueueReport != 0L) {
|
||||||
_statslog.log("max_invoker_queue_size " + _maxQueueSize);
|
_statslog.log("max_invoker_queue_size " + _maxQueueSize);
|
||||||
_maxQueueSize = queueSize;
|
_maxQueueSize = queueSize;
|
||||||
_nextQueueReport += 60 * 1000L;
|
_nextQueueReport +=
|
||||||
|
PresentsDObjectMgr.QUEUE_PROFILING_INTERVAL;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_nextQueueReport = start + 60 * 1000L;
|
_nextQueueReport =
|
||||||
|
start + PresentsDObjectMgr.QUEUE_PROFILING_INTERVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user