Package org.eclipse.epsilon.profiling
Class Profiler
- java.lang.Object
-
- org.eclipse.epsilon.profiling.Profiler
-
public class Profiler extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ProfilerTarget
activeTarget
protected IEolContext
context
static Profiler
INSTANCE
protected Collection<IProfilerListener>
listeners
protected ProfilerTarget
root
protected Stopwatch
stopwatch
protected List<String>
targetNames
protected Map<String,Long>
targets
-
Constructor Summary
Constructors Constructor Description Profiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(IProfilerListener listener)
protected void
collectExecutionTimes(HashMap<String,ExecutionTime> executionTimes, ProfilerTarget target)
IEolContext
getContext()
protected long
getExecutionCount(String targetName)
ProfilerOverview
getOverview()
ProfilerTarget
getRoot()
Stopwatch
getStopwatch()
List<String>
getTargetNames()
List<ProfilerTargetSummary>
getTargetSummaries()
boolean
isRunning(String targetName)
void
refresh()
void
removeListener(IProfilerListener listener)
void
reset()
void
setContext(IEolContext context)
ProfilerTarget
start(String targetName)
ProfilerTarget
start(String targetName, String data, ModuleElement moduleElement)
void
stop()
void
stop(String target)
-
-
-
Field Detail
-
listeners
protected Collection<IProfilerListener> listeners
-
INSTANCE
public static final Profiler INSTANCE
-
root
protected ProfilerTarget root
-
activeTarget
protected ProfilerTarget activeTarget
-
stopwatch
protected Stopwatch stopwatch
-
context
protected IEolContext context
-
-
Method Detail
-
start
public ProfilerTarget start(String targetName)
-
start
public ProfilerTarget start(String targetName, String data, ModuleElement moduleElement)
-
refresh
public void refresh()
-
stop
public void stop()
-
stop
public void stop(String target)
-
getOverview
public ProfilerOverview getOverview()
-
getTargetSummaries
public List<ProfilerTargetSummary> getTargetSummaries()
-
collectExecutionTimes
protected void collectExecutionTimes(HashMap<String,ExecutionTime> executionTimes, ProfilerTarget target)
-
getExecutionCount
protected long getExecutionCount(String targetName)
-
isRunning
public boolean isRunning(String targetName)
-
reset
public void reset()
-
addListener
public void addListener(IProfilerListener listener)
-
removeListener
public void removeListener(IProfilerListener listener)
-
getStopwatch
public Stopwatch getStopwatch()
-
getRoot
public ProfilerTarget getRoot()
-
getContext
public IEolContext getContext()
- Returns:
- Since:
- 2.3
-
setContext
public void setContext(IEolContext context)
- Parameters:
context
-- Since:
- 2.3
-
-