public class Profiler
extends java.lang.Object
implements jadex.rules.state.IProfiler, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
cut
The cut index (older entries are removed).
|
protected java.lang.String |
name
The file name for saving.
|
protected java.util.List |
profiles
The recorded (finished) profilings.
|
protected java.util.List |
stack
The stack of open profilings.
|
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 and Description |
---|
Profiler(java.lang.String name)
Create a new profiler.
|
Modifier and Type | Method and Description |
---|---|
jadex.rules.state.IProfiler.ProfilingInfo[] |
getProfilingInfos(int start)
Get the current profiling infos from the given start index.
|
void |
start(java.lang.String type,
java.lang.Object item)
Start profiling an item.
|
void |
stop(java.lang.String type,
java.lang.Object item)
Stop profiling the current item.
|
protected java.lang.String name
protected java.util.List profiles
protected java.util.List stack
protected int cut
public void start(java.lang.String type, java.lang.Object item)
start
in interface jadex.rules.state.IProfiler
type
- A constant representing the event or activity type being profiled (e.g. object added).item
- An optional element corresponding to the activity (e.g. the object type).public void stop(java.lang.String type, java.lang.Object item)
stop
in interface jadex.rules.state.IProfiler
type
- A constant representing the event or activity type being profiled (e.g. object added).item
- The element corresponding to the activity (e.g. the object type).public jadex.rules.state.IProfiler.ProfilingInfo[] getProfilingInfos(int start)
getProfilingInfos
in interface jadex.rules.state.IProfiler
start
- The start index (use 0 for all profiling infos).