|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.jsfunit.framework.JSFTimer
public class JSFTimer
The JSFTimer collects performance data during a JSF request. It tracks the time for each phase in the JSF Lifecycle and remains accurate even when phases are skipped. To use this class you just need to get the instance with the static getTimer() method. The instance is held in the session. Statistics are reset at the beginning of each JSF request. So you can use this class during the JSF lifecycle or afterwards in a JSFUnit test. To use this class, you must enable the JSFTimerPhaseListener in faces-config.xml.
JSFTimerPhaseListener
Field Summary | |
---|---|
static String |
REQUEST_KEY
|
Method Summary | |
---|---|
long |
getPhaseTime(javax.faces.event.PhaseId phaseId)
Returns the amount of time spent during a JSF phase. |
static JSFTimer |
getTimer()
Get a reference to the JSFTimer. |
long |
getTotalTime()
Returns the total time spent in the JSF lifecycle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REQUEST_KEY
Method Detail |
---|
public static JSFTimer getTimer()
IllegalStateException
- If no JSF requests have been made on this session.public long getTotalTime()
public long getPhaseTime(javax.faces.event.PhaseId phaseId)
phaseId
- The PhaseId.
IllegalArgumentException
- if the phaseId is ANY_PHASE.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |