|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.endeca.infront.assembler.perf.AssemblerPerfUtils
public class AssemblerPerfUtils
A static interface to ease use of Assembler performance timing primitives.
A thread-local is used to store the current thread's performance events.
The only provided Event is the TimeEvent.
Events may be serialized by registering EventSerializer's with
this interface, two of which are provided:
EventSerializer's with
this interface, two of which are provided:
| Method Summary | |
|---|---|
static void |
addEventSerializer(EventSerializer serializer)
Registers a serializer with the system. |
static boolean |
isTimingPerformance()
Returns whether performance is being monitored on the current request/thread. |
static void |
startEvent(Object object,
String name)
Called to start a new performance event. |
static void |
startEvent(String id)
Called to start a new performance event. |
static void |
startPerformanceTiming(javax.servlet.http.HttpServletRequest request)
Starts performance timing on the current request/thread. |
static void |
stopEvent(Object object,
String name)
Called to stop an event that was previously started. |
static void |
stopEvent(String id)
Called to stop an event that was previously started. |
static void |
stopPerformanceTiming()
Stops performance timing on the current request/thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void startPerformanceTiming(javax.servlet.http.HttpServletRequest request)
public static void stopPerformanceTiming()
addEventSerializer(EventSerializer)).
public static boolean isTimingPerformance()
public static void addEventSerializer(EventSerializer serializer)
serializer - the EventSerializer to add
public static void startEvent(Object object,
String name)
startEvent MUST always include a corresponding
call to stopEvent or undefined behavior will result.
The resulting full event name will be
obj.getClass().getName() + "_" + name.
object - the Object which the event is taking place onname - the name of the event
public static void stopEvent(Object object,
String name)
startEvent/stopEvent
must be matched or undefined behavior will result.
The resulting full event name will be
obj.getClass().getName() + "_" + name.
object - the Object which the event is taking place on
(this object MUST be the same class as the object used to
start the event)name - the name of the event (this name must be equal to the name
used when starting this event)public static void startEvent(String id)
startEvent MUST always include a corresponding
call to stopEvent or undefined behavior will result.
id - the representative id of a timing eventpublic static void stopEvent(String id)
startEvent/stopEvent
must be matched or undefined behavior will result.
id - the representative id of the performance event (this id must be
equal to the id that was used to start this event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||