Package org.eclipse.epsilon.profiling
Class Profiler
- java.lang.Object
-
- org.eclipse.epsilon.profiling.Profiler
-
public class Profiler extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ProfilerTarget
activeTarget
static Profiler
INSTANCE
protected java.util.Collection<IProfilerListener>
listeners
protected ProfilerTarget
root
protected Stopwatch
stopwatch
protected java.util.List<java.lang.String>
targetNames
protected java.util.Map<java.lang.String,java.lang.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(java.util.HashMap<java.lang.String,ExecutionTime> executionTimes, ProfilerTarget target)
protected long
getExecutionCount(java.lang.String targetName)
ProfilerOverview
getOverview()
ProfilerTarget
getRoot()
Stopwatch
getStopwatch()
java.util.List<java.lang.String>
getTargetNames()
java.util.List<ProfilerTargetSummary>
getTargetSummaries()
boolean
isRunning(java.lang.String targetName)
void
refresh()
void
removeListener(IProfilerListener listener)
void
reset()
ProfilerTarget
start(java.lang.String targetName)
ProfilerTarget
start(java.lang.String targetName, java.lang.String data, ModuleElement moduleElement)
void
stop()
void
stop(java.lang.String target)
-
-
-
Field Detail
-
listeners
protected java.util.Collection<IProfilerListener> listeners
-
INSTANCE
public static Profiler INSTANCE
-
root
protected ProfilerTarget root
-
activeTarget
protected ProfilerTarget activeTarget
-
stopwatch
protected Stopwatch stopwatch
-
targets
protected java.util.Map<java.lang.String,java.lang.Long> targets
-
targetNames
protected java.util.List<java.lang.String> targetNames
-
-
Method Detail
-
start
public ProfilerTarget start(java.lang.String targetName)
-
start
public ProfilerTarget start(java.lang.String targetName, java.lang.String data, ModuleElement moduleElement)
-
refresh
public void refresh()
-
stop
public void stop()
-
stop
public void stop(java.lang.String target)
-
getTargetNames
public java.util.List<java.lang.String> getTargetNames()
-
getOverview
public ProfilerOverview getOverview()
-
getTargetSummaries
public java.util.List<ProfilerTargetSummary> getTargetSummaries()
-
collectExecutionTimes
protected void collectExecutionTimes(java.util.HashMap<java.lang.String,ExecutionTime> executionTimes, ProfilerTarget target)
-
getExecutionCount
protected long getExecutionCount(java.lang.String targetName)
-
isRunning
public boolean isRunning(java.lang.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()
-
-