Class ProfilerModelHandler
- java.lang.Object
-
- org.eclipse.m2m.atl.profiler.core.ProfilerModelHandler
-
public final class ProfilerModelHandler extends java.lang.ObjectClass that build the profiling model.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseOperation(java.lang.String sfOpName, IStackFrame frame)Close execution with current operation node.voidendExecution()Ends profiling execution.static ProfilerModelHandlergetInstance()Singleton access.longgetModelTotalInstructions()Returns the total instructions count.doublegetModelTotalTime()Returns the total time.java.util.Map<java.lang.String,ATLOperation>getOperationRegistry()ProfilingModelgetProfilingModel()voidinit()Initialize the model.voidinterceptError(IStackFrame frame, java.lang.String msg, java.lang.Throwable e)Prepare error object to show in the execution display.booleanisDebugMessages()booleanisHasTocreateStep()voidmakeStep(IStackFrame frame)Execute simple asm instruction.voidnewOperation(java.lang.String sfOpName, IStackFrame frame, ATLOperation atlOperation, org.eclipse.emf.ecore.EObject atlElement)Create new operation node or start with the root model.voidsetDebugMessages(boolean debugMessages)voidsetHasTocreateStep(boolean hasTocreateStep)voidsetProfilingModel(ProfilingModel profilingModel)
-
-
-
Method Detail
-
getInstance
public static ProfilerModelHandler getInstance()
Singleton access.- Returns:
- the
ProfilerModelHandlersingleton instance
-
init
public void init()
Initialize the model.
-
newOperation
public void newOperation(java.lang.String sfOpName, IStackFrame frame, ATLOperation atlOperation, org.eclipse.emf.ecore.EObject atlElement)Create new operation node or start with the root model.- Parameters:
sfOpName- the operation nameframe- the frameatlOperation- the atl operationatlElement- the atlEObject
-
interceptError
public void interceptError(IStackFrame frame, java.lang.String msg, java.lang.Throwable e)
Prepare error object to show in the execution display.- Parameters:
frame- the framemsg- the error messagee- the exception
-
closeOperation
public void closeOperation(java.lang.String sfOpName, IStackFrame frame) throws NoRegisteredOperationFoundException, InterceptedLeavingStackFrameExceptionClose execution with current operation node.- Parameters:
sfOpName- the operation nameframe- the frame- Throws:
NoRegisteredOperationFoundExceptionInterceptedLeavingStackFrameException
-
makeStep
public void makeStep(IStackFrame frame)
Execute simple asm instruction.- Parameters:
frame- the frame
-
endExecution
public void endExecution()
Ends profiling execution.
-
getModelTotalTime
public double getModelTotalTime()
Returns the total time.- Returns:
- the total time
-
getModelTotalInstructions
public long getModelTotalInstructions()
Returns the total instructions count.- Returns:
- the total instructions count
-
getProfilingModel
public ProfilingModel getProfilingModel()
-
setProfilingModel
public void setProfilingModel(ProfilingModel profilingModel)
-
getOperationRegistry
public java.util.Map<java.lang.String,ATLOperation> getOperationRegistry()
-
isDebugMessages
public boolean isDebugMessages()
-
setDebugMessages
public void setDebugMessages(boolean debugMessages)
-
isHasTocreateStep
public boolean isHasTocreateStep()
-
setHasTocreateStep
public void setHasTocreateStep(boolean hasTocreateStep)
-
-