Package jadex.rules.tools.profiler
Class Profiler
- java.lang.Object
-
- jadex.rules.tools.profiler.Profiler
-
- All Implemented Interfaces:
IProfiler,java.io.Serializable
public class Profiler extends java.lang.Object implements IProfiler, java.io.Serializable
Default implementation for profiler.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jadex.rules.state.IProfiler
IProfiler.ProfilingInfo
-
-
Field Summary
Fields Modifier and Type Field Description protected intcutThe cut index (older entries are removed).protected java.lang.StringnameThe file name for saving.protected java.util.ListprofilesThe recorded (finished) profilings.protected java.util.ListstackThe stack of open profilings.-
Fields inherited from interface jadex.rules.state.IProfiler
NODEEVENT_OBJECTADDED, NODEEVENT_OBJECTMODIFIED, NODEEVENT_OBJECTREMOVED, NODEEVENT_TUPLEADDED, NODEEVENT_TUPLEMODIFIED, NODEEVENT_TUPLEREMOVED, OBJECTEVENT_ADDED, OBJECTEVENT_MODIFIED, OBJECTEVENT_REMOVED, TYPE_NODE, TYPE_NODEEVENT, TYPE_OBJECT, TYPE_OBJECTEVENT, TYPE_ROOT, TYPE_RULE
-
-
Constructor Summary
Constructors Constructor Description Profiler(java.lang.String name)Create a new profiler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IProfiler.ProfilingInfo[]getProfilingInfos(int start)Get the current profiling infos from the given start index.voidstart(java.lang.String type, java.lang.Object item)Start profiling an item.voidstop(java.lang.String type, java.lang.Object item)Stop profiling the current item.
-
-
-
Method Detail
-
start
public void start(java.lang.String type, java.lang.Object item)Start profiling an item. Nesting (i.e. calling start() several times before calling corresponding stops) is allowed.
-
stop
public void stop(java.lang.String type, java.lang.Object item)Stop profiling the current item. Calls to stop() have match the last unstopped call to start(), with respect to the supplied types and items.
-
getProfilingInfos
public IProfiler.ProfilingInfo[] getProfilingInfos(int start)
Get the current profiling infos from the given start index.- Specified by:
getProfilingInfosin interfaceIProfiler- Parameters:
start- The start index (use 0 for all profiling infos).
-
-