|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectetm.core.monitor.EtmMonitorSupport
public abstract class EtmMonitorSupport
Abstract base class for the execution time measurement monitors. An EtmMonitor mandates the following life cycle for measurement points.
visitPreMeasurement(MeasurementPoint).
visitPreMeasurement(etm.core.monitor.MeasurementPoint) the EtmMonitor sets the start time
of the measurement.
visitPostCollect(MeasurementPoint). This call is triggered by
MeasurementPoint.collect().
visitPostCollect(etm.core.monitor.MeasurementPoint) the EtmMonitor sets the end time
of the measurement and stores this transaction for further aggregation.
| Field Summary | |
|---|---|
protected Aggregator |
aggregator
|
protected java.lang.String |
description
|
protected java.util.List |
plugins
|
protected ExecutionTimer |
timer
|
| Constructor Summary | |
|---|---|
protected |
EtmMonitorSupport(java.lang.String aDescription,
ExecutionTimer aTimer,
Aggregator aAggregator)
Creates a EtmMonitorSupport instance. |
| Method Summary | |
|---|---|
void |
addPlugin(EtmPlugin aEtmPlugin)
Adds a new plugin which is part of the EtmMonitor lifecycle. |
void |
aggregate()
Aggregates the current measurement details. |
EtmPoint |
createPoint(java.lang.String symbolicName)
Creates a new EtmPoint with the given name. |
void |
disableCollection()
Disables result collection. |
protected abstract void |
doVisitPostCollect(MeasurementPoint aPoint)
Callback method for derived classes. |
protected abstract void |
doVisitPreMeasurement(MeasurementPoint aMeasurementPoint)
Callback method for derived classes. |
void |
enableCollection()
Enables result collection. |
protected Aggregator |
getDefaultAggregator()
|
EtmMonitorMetaData |
getMetaData()
Returns metadata for the monitor. |
boolean |
isCollecting()
Returns whether the given monitor instance is collecting results right now. |
boolean |
isStarted()
Returns wether the monitor is started or not. |
void |
onStateLoaded(AggregationStateLoadedEvent event)
|
void |
render(MeasurementRenderer renderer)
Renders the current measurement results. |
void |
reset()
Resets all available measurements. |
void |
reset(java.lang.String measurementPoint)
Resets a specific measurement. |
void |
setPlugins(java.util.List newPlugins)
Adds a list of plugins. |
protected void |
shutdownPlugins()
|
void |
start()
Starts the EtmMonitor. |
protected void |
startPlugins()
|
void |
stop()
Stops the EtmMonitor. |
void |
visitPostCollect(MeasurementPoint measurementPoint)
|
void |
visitPreMeasurement(MeasurementPoint measurementPoint)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String description
protected final ExecutionTimer timer
protected final Aggregator aggregator
protected java.util.List plugins
| Constructor Detail |
|---|
protected EtmMonitorSupport(java.lang.String aDescription,
ExecutionTimer aTimer,
Aggregator aAggregator)
aDescription - The description for this monitor.aTimer - The timer to use.aAggregator - The aggregator to use.| Method Detail |
|---|
public EtmPoint createPoint(java.lang.String symbolicName)
EtmMonitor
createPoint in interface EtmMonitorsymbolicName - The symbolic name or null. Ensure to call EtmPoint.alterName(String)
before collection if symbolic name was null.
public final void visitPreMeasurement(MeasurementPoint measurementPoint)
public final void visitPostCollect(MeasurementPoint measurementPoint)
public final void aggregate()
EtmMonitor
aggregate in interface EtmMonitorpublic void render(MeasurementRenderer renderer)
EtmMonitor
render in interface EtmMonitorrenderer - A measurement renderer.public void reset()
EtmMonitor
reset in interface EtmMonitorpublic void reset(java.lang.String measurementPoint)
EtmMonitor
reset in interface EtmMonitormeasurementPoint - The symbolic name of the measurement to reset.public final EtmMonitorMetaData getMetaData()
EtmMonitor
getMetaData in interface EtmMonitorpublic void start()
EtmMonitor
start in interface EtmMonitorpublic void stop()
EtmMonitor
stop in interface EtmMonitorpublic boolean isStarted()
EtmMonitor
isStarted in interface EtmMonitorpublic void enableCollection()
EtmMonitor
enableCollection in interface EtmMonitorpublic void disableCollection()
EtmMonitor
disableCollection in interface EtmMonitorpublic boolean isCollecting()
EtmMonitor
isCollecting in interface EtmMonitorpublic void addPlugin(EtmPlugin aEtmPlugin)
EtmMonitor
addPlugin in interface EtmMonitoraEtmPlugin - The new EtmPlugin.public void setPlugins(java.util.List newPlugins)
EtmMonitor
setPlugins in interface EtmMonitornewPlugins - A list of EtmPlugin.public void onStateLoaded(AggregationStateLoadedEvent event)
onStateLoaded in interface AggregationStateListenerprotected abstract void doVisitPreMeasurement(MeasurementPoint aMeasurementPoint)
MeasurementPoint.getTicks() nor MeasurementPoint.getStartTime() are set
at that point.
aMeasurementPoint - The measurement point just created.protected abstract void doVisitPostCollect(MeasurementPoint aPoint)
aPoint - The point to collect.protected Aggregator getDefaultAggregator()
protected void shutdownPlugins()
protected void startPlugins()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||