public class ProfilingModelRunner extends DefaultModelRunner
_cycleRunner, _model, _service
Constructor and Description |
---|
ProfilingModelRunner(java.util.concurrent.ExecutorService service,
IModel model,
ICycleProcessor cycleRunner) |
Modifier and Type | Method and Description |
---|---|
double |
getActualCycleTime()
return just the time spent in cycle()
|
double |
getActualEventTime() |
double |
getActualWaitTime()
return just the time spent waiting for the clock
|
double |
getRealTimeFactor() |
double |
getSimulatedTime() |
long |
getTotalCycles() |
double |
getTotalCycleTime()
comprised of both actual processing time and waiting time
|
protected void |
postClock(double currentSimulatedTime)
called after waitForClock returns
|
protected void |
postCycle(double nextTime)
called after each cycle
|
protected void |
postEventFiring() |
protected void |
preClock()
called before blocking on waitForClock
|
protected void |
preCycle(double currentSimulatedTime)
called before each cycle starts
|
protected void |
preEventFiring() |
protected void |
startUp() |
cycle, firePendingEvents, run, runModelLoop, shutDown, waitForClock
public ProfilingModelRunner(java.util.concurrent.ExecutorService service, IModel model, ICycleProcessor cycleRunner)
service
- model
- cycleRunner
- protected void startUp()
startUp
in class DefaultModelRunner
protected void preEventFiring()
preEventFiring
in class DefaultModelRunner
protected void postEventFiring()
postEventFiring
in class DefaultModelRunner
protected void preCycle(double currentSimulatedTime)
DefaultModelRunner
preCycle
in class DefaultModelRunner
protected void postCycle(double nextTime)
DefaultModelRunner
postCycle
in class DefaultModelRunner
protected void preClock()
DefaultModelRunner
preClock
in class DefaultModelRunner
protected void postClock(double currentSimulatedTime)
DefaultModelRunner
postClock
in class DefaultModelRunner
public long getTotalCycles()
public double getTotalCycleTime()
public double getActualCycleTime()
public double getActualWaitTime()
public double getActualEventTime()
public double getSimulatedTime()
public double getRealTimeFactor()