Class EngineMetricsCollector
java.lang.Object
com.assemblyrobot.simulator.core.clock.TickAdvanceListener
com.assemblyrobot.simulator.system.metricscollectors.EngineMetricsCollector
public class EngineMetricsCollector extends TickAdvanceListener
Collects metrics from the
Engine
. This exists as a subclass to make it a TickAdvanceListener
, thus making collecting simulation time easier.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EngineMetricsCollector.Metrics
-
Constructor Summary
Constructors Constructor Description EngineMetricsCollector(@NonNull Engine engine)
-
Method Summary
Modifier and Type Method Description protected void
onTickAdvance(long ticksAdvanced)
Callback method for when the clock moves forward.protected void
onTickReset()
Callback method for when the clock tick was reset to 0.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
EngineMetricsCollector
-
-
Method Details
-
onTickAdvance
protected void onTickAdvance(long ticksAdvanced)Description copied from class:TickAdvanceListener
Callback method for when the clock moves forward.- Specified by:
onTickAdvance
in classTickAdvanceListener
- Parameters:
ticksAdvanced
- The amount of ticks that the clock moved forward by.
-
onTickReset
protected void onTickReset()Description copied from class:TickAdvanceListener
Callback method for when the clock tick was reset to 0.- Specified by:
onTickReset
in classTickAdvanceListener
-