if(stateMachine.isStarted()) {
performanceMonitor.onStateMachineStart(stateMachine);
}
return "Performance Monitor Start";
} else {
StateMachinePerformanceModel perfModel = performanceMonitor.getPerfModel();
this.totalTransitionInvokedTimes = perfModel.getTotalTransitionInvokedTimes();
this.totalTransitionDeclinedTimes = perfModel.getTotalTransitionDeclinedTimes();
this.totalTransitionFailedTimes = perfModel.getTotalTransitionFailedTimes();
this.averageTranstionConsumedTime = perfModel.getAverageTranstionConsumedTime();
perfStatDetails = perfModel.toString();
stateMachine.removeDeclarativeListener(performanceMonitor);
performanceMonitor = null;
return "Performance Monitor End";
}
}