public final class IdeProfile
extends java.lang.Object
The following code is an example on how to instrument your code: Example:
{ int handle = IdeProfile.startEvent(handle, IdeProfile.PROF_XXX, "Hello"); ... IdeProfile.endEvent(handle); }
If your String comment is constructed (ex: this.toString()
)
it is preferable to check the isActive() method to determine if it is
necessary to call the IdeProfile.startEvent(toString())
There is a better way to instrument the code using the
void startEvent(int[], ...)
methods. This call is equivalent to
int startEvent(int, String)
except that the call can
be totally excluded from the class file using the -exclude compiler
parameter and the allocated event[] is will be removed by the optimizer.
{ int[] handle = new int[1]; if (IdeProfile.isActive()) { IdeProfile.startEvent(handle, IdeProfile.PROF_XXX, "Hello"); } ... IdeProfile.endEvent(handle); }
Modifier and Type | Field and Description |
---|---|
static int |
PROF_CMT_FIRST
Deprecated.
|
static int |
PROF_CMT_LAST
Deprecated.
|
static int |
PROF_DEBUGGER_FIRST
Deprecated.
|
static int |
PROF_DEBUGGER_LAST
Deprecated.
|
static int |
PROF_DOCK_LAYOUT
Deprecated.
Measure the time needed to re-layout the docked windows
|
static int |
PROF_EJB_FIRST
Deprecated.
|
static int |
PROF_EJB_LAST
Deprecated.
|
static int |
PROF_FIRST
Deprecated.
|
static int |
PROF_GENERIC
Deprecated.
because you are not supposed to checkin code with this ID.
|
static int |
PROF_IDE_FIRST
Deprecated.
|
static int |
PROF_IDE_LAST
Deprecated.
|
static int |
PROF_IDEIMPL_FIRST
Deprecated.
|
static int |
PROF_IDEIMPL_LAST
Deprecated.
|
static int |
PROF_INIT_ADDINS
Deprecated.
Measures the initialization of the addins
|
static int |
PROF_JDEVELOPER_FIRST
Deprecated.
|
static int |
PROF_JDEVELOPER_LAST
Deprecated.
|
static int |
PROF_JDEVIMPL_FIRST
Deprecated.
|
static int |
PROF_JDEVIMPL_LAST
Deprecated.
|
static int |
PROF_JOT_FIRST
Deprecated.
|
static int |
PROF_JOT_LAST
Deprecated.
|
static int |
PROF_KEYPRESSED
Deprecated.
Pulse an event every time a key is pressed.
|
static int |
PROF_LOAD_ADDINS
Deprecated.
Measures the load of the addins
|
static int |
PROF_NOTIFY_OBSERVERS
Deprecated.
Event for calls to IdeSubject.notifyObserver
|
static int |
PROF_PERSISTENCE_FIRST
Deprecated.
|
static int |
PROF_PERSISTENCE_LAST
Deprecated.
|
static int |
PROF_REFACTORING_FIRST
Deprecated.
|
static int |
PROF_REFACTORING_LAST
Deprecated.
|
static int |
PROF_STARTUP
Deprecated.
Measures the startup of the IDE
|
Constructor and Description |
---|
IdeProfile()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static void |
endEvent(int handle)
Deprecated.
Stop a profiler event
|
static void |
endEvent(int[] handle)
Deprecated.
Stop a profiler event
|
static void |
endEvent(int[] handle,
java.lang.String comment)
Deprecated.
Stop a profiler event
|
static void |
endEvent(int handle,
java.lang.String comment)
Deprecated.
Stop a profiler event
|
static boolean |
isActive()
Deprecated.
|
static boolean |
isEventActive(int eventID)
Deprecated.
|
static void |
pulseEvent(int event,
java.lang.String comment)
Deprecated.
Pulse a profiler event
|
static int |
startEvent(int event)
Deprecated.
Starts a profiler event
|
static void |
startEvent(int[] handle,
int event)
Deprecated.
Starts a profiler event
|
static void |
startEvent(int[] handle,
int event,
java.lang.String comment)
Deprecated.
Starts a profiler event
|
static int |
startEvent(int event,
java.lang.String comment)
Deprecated.
Starts a profiler event
|
static void |
startSampling()
Deprecated.
Start profiler sampling
|
static void |
stopSampling()
Deprecated.
Stop profiler sampling
|
public static int PROF_FIRST
public static final int PROF_GENERIC
public static final int PROF_STARTUP
public static final int PROF_LOAD_ADDINS
public static final int PROF_INIT_ADDINS
public static final int PROF_KEYPRESSED
public static final int PROF_DOCK_LAYOUT
public static final int PROF_NOTIFY_OBSERVERS
public static final int PROF_JOT_FIRST
public static final int PROF_JOT_LAST
public static final int PROF_CMT_FIRST
public static final int PROF_CMT_LAST
public static final int PROF_IDE_FIRST
public static final int PROF_IDE_LAST
public static final int PROF_IDEIMPL_FIRST
public static final int PROF_IDEIMPL_LAST
public static final int PROF_JDEVELOPER_FIRST
public static final int PROF_JDEVELOPER_LAST
public static final int PROF_JDEVIMPL_FIRST
public static final int PROF_JDEVIMPL_LAST
public static final int PROF_EJB_FIRST
public static final int PROF_EJB_LAST
public static final int PROF_DEBUGGER_FIRST
public static final int PROF_DEBUGGER_LAST
public static final int PROF_PERSISTENCE_FIRST
public static final int PROF_PERSISTENCE_LAST
public static final int PROF_REFACTORING_FIRST
public static final int PROF_REFACTORING_LAST
public static boolean isActive()
public static boolean isEventActive(int eventID)
public static int startEvent(int event, java.lang.String comment)
event
- the event IDcomment
- comments you want to see in the profile reportpublic static int startEvent(int event)
event
- the event IDpublic static void startEvent(int[] handle, int event, java.lang.String comment)
handle
- the event handle to be used in the endEvent callevent
- the event IDcomment
- comments you want to see in the profile reportpublic static void startEvent(int[] handle, int event)
handle
- the event handle to be used in the endEvent callevent
- the event IDpublic static void endEvent(int handle, java.lang.String comment)
handle
- the event handle returned by the startEvent callcomment
- comments you want to see in the profile reportpublic static void endEvent(int handle)
handle
- the event handle returned by the startEvent callpublic static void endEvent(int[] handle, java.lang.String comment)
handle
- the event handle returned by the startEvent callcomment
- comments you want to see in the profile reportpublic static void endEvent(int[] handle)
handle
- the event handle returned by the startEvent callpublic static void pulseEvent(int event, java.lang.String comment)
event
- the event IDcomment
- comments you want to see in the profile reportpublic static void startSampling()
public static void stopSampling()