org.opencms.main
Class CmsReqStatistics

java.lang.Object
  extended by org.opencms.main.CmsReqStatistics

public final class CmsReqStatistics
extends java.lang.Object

Statistics object for request performance.


Method Summary
static void endCmsInit(java.lang.String name)
          Sets the endtime of a CmsObject init step.
 java.lang.String getCmsInitInfo()
          Gets the CmsObject init information.
 long getCmsInitTime()
          Gets the total time used for CmsObject init.
 java.lang.String getConn(java.lang.String poolname)
          Gets the connection summary.
 java.lang.String getSummary()
          Gets the statistics summary.
 long getTime()
          Gets the total time used of the statistics object.
static void setCmsObjectInitTime()
          Sets the timestamp after CmsObject initialization.
static void setEndTime()
          Sets the endtime timestamp and logs the statistics.
static void setInitResoueceTime()
          Sets the timestamp after CmsResource initialization.
static void setLoadResoueceTime()
          Sets the timestamp after resource load and display.
static void startCmsInit(java.lang.String name)
          Sets the starttime of a CmsObject init step.
static void startStatistics(java.lang.String requestedUrl)
          Starts request statistics for a requested URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

endCmsInit

public static void endCmsInit(java.lang.String name)
Sets the endtime of a CmsObject init step.

Parameters:
name - name of the handler

setCmsObjectInitTime

public static void setCmsObjectInitTime()
Sets the timestamp after CmsObject initialization.


setEndTime

public static void setEndTime()
Sets the endtime timestamp and logs the statistics. The statistics object will be cleared afterwards.


setInitResoueceTime

public static void setInitResoueceTime()
Sets the timestamp after CmsResource initialization.


setLoadResoueceTime

public static void setLoadResoueceTime()
Sets the timestamp after resource load and display.


startCmsInit

public static void startCmsInit(java.lang.String name)
Sets the starttime of a CmsObject init step.

Parameters:
name - name of the handler

startStatistics

public static void startStatistics(java.lang.String requestedUrl)
Starts request statistics for a requested URL.

Parameters:
requestedUrl - the requested URL

getCmsInitInfo

public java.lang.String getCmsInitInfo()
Gets the CmsObject init information.

Returns:
string containing the CmsObject init info

getCmsInitTime

public long getCmsInitTime()
Gets the total time used for CmsObject init.

Returns:
total time used for CmsObject init

getConn

public java.lang.String getConn(java.lang.String poolname)
                         throws CmsDbException
Gets the connection summary.

Parameters:
poolname - name of the connection pool
Returns:
string containing the summary info
Throws:
CmsDbException - if accessing the db pools fails

getSummary

public java.lang.String getSummary()
Gets the statistics summary.

Returns:
string containing the summary info

getTime

public long getTime()
Gets the total time used of the statistics object.

Returns:
total time used by the object