|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.TimerTask fulmine.util.log.Statistics
public final class Statistics
A standard implementation. This logs statistics at the INFO level and updates
an information container. The information container (or 'info record') is
created lazily to get around some startup lifecycle sequence clashes between
the IEventManager
and IModelManager
that compose the context.
The statistics are grouped into 'interval' and 'total' groups. The interval group is for statistics in the last sampling interval whilst the total group maintains statistics for all sampling intervals since sampling began.
Field Summary | |
---|---|
static String |
DEFAUL_TIME_PERIOD
The default log time period |
static long |
TIME_PERIOD
The time period in milliseconds for logging statistics |
static String |
TIME_PERIOD_PROPERTY
System property to define the time period (in milliseconds) for logging. |
Constructor Summary | |
---|---|
Statistics(String infoRecordIdentity,
IModelManager context)
Standard constructor |
Method Summary | |
---|---|
void |
intervalFinished(int queueSize,
int popped)
Signals the end of a sampling interval. |
void |
processEvent(long elapsedTimeMicroSecs)
Process a new event in the current interval. |
void |
run()
Handles updating the info record with the statistics. |
String |
toString()
|
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String TIME_PERIOD_PROPERTY
DEFAUL_TIME_PERIOD
public static final String DEFAUL_TIME_PERIOD
public static final long TIME_PERIOD
Constructor Detail |
---|
public Statistics(String infoRecordIdentity, IModelManager context)
infoRecordIdentity
- the identity for the information container recordcontext
- the context, used to lazily create the info recordMethod Detail |
---|
public void processEvent(long elapsedTimeMicroSecs)
IStatistics
processEvent
in interface IStatistics
elapsedTimeMicroSecs
- the elapsed time of this event on its queue (its latency)public void intervalFinished(int queueSize, int popped)
IStatistics
intervalFinished
in interface IStatistics
queueSize
- the queue size at the end of this intervalpopped
- the number of items popped in this intervalpublic final String toString()
toString
in class Object
public void run()
run
in interface Runnable
run
in class TimerTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |