Package org.eclipse.m2m.atl.profiler.core

# Class ProfilerModelHandler

java.lang.Object
org.eclipse.m2m.atl.profiler.core.ProfilerModelHandler

public final class ProfilerModelHandler extends Object
Class that build the profiling model.

## Method Summary

Modifier and Type
Method
Description
`void`
`closeOperation(String sfOpName, IStackFrame frame)`
Close execution with current operation node.
`void`
`endExecution()`
Ends profiling execution.
`static ProfilerModelHandler`
`getInstance()`
Singleton access.
`long`
`getModelTotalInstructions()`
Returns the total instructions count.
`double`
`getModelTotalTime()`
Returns the total time.
`Map<String,ATLOperation>`
`getOperationRegistry()`
`ProfilingModel`
`getProfilingModel()`
`void`
`init()`
Initialize the model.
`void`
`interceptError(IStackFrame frame, String msg, Throwable e)`
Prepare error object to show in the execution display.
`boolean`
`isDebugMessages()`
`boolean`
`isHasTocreateStep()`
`void`
`makeStep(IStackFrame frame)`
Execute simple asm instruction.
`void`
`newOperation(String sfOpName, IStackFrame frame, ATLOperation atlOperation, org.eclipse.emf.ecore.EObject atlElement)`
Create new operation node or start with the root model.
`void`
`setDebugMessages(boolean debugMessages)`
`void`
`setHasTocreateStep(boolean hasTocreateStep)`
`void`
`setProfilingModel(ProfilingModel profilingModel)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getInstance

public static ProfilerModelHandler getInstance()
Singleton access.

Returns:
  the `ProfilerModelHandler` singleton instance

### init

public void init()
Initialize the model.

### newOperation

public void newOperation(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 name
  `frame` - the frame
  `atlOperation` - the atl operation
  `atlElement` - the atl `EObject`

### interceptError

public void interceptError(IStackFrame frame, String msg, Throwable e)
Prepare error object to show in the execution display.

Parameters:
  `frame` - the frame
  `msg` - the error message
  `e` - the exception

### closeOperation

public void closeOperation(String sfOpName, IStackFrame frame) throws NoRegisteredOperationFoundException, InterceptedLeavingStackFrameException
Close execution with current operation node.

Parameters:
  `sfOpName` - the operation name
  `frame` - the frame
Throws:
  `NoRegisteredOperationFoundException`
  `InterceptedLeavingStackFrameException`

### 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 Map<String,ATLOperation> getOperationRegistry()

### isDebugMessages

public boolean isDebugMessages()

### setDebugMessages

public void setDebugMessages(boolean debugMessages)

### isHasTocreateStep

public boolean isHasTocreateStep()

### setHasTocreateStep

public void setHasTocreateStep(boolean hasTocreateStep)