|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.appserver.ServerStats
public class ServerStats
ServerStats This class is used to log server events to a file, in Server Statistics files. It can track counts (how many times something was done) and average elapsed times. File writing is controlled by the logging.properties file settings. User-defined events can be added using addServerStatsEvent.
Constructor Summary | |
---|---|
ServerStats()
|
Method Summary | |
---|---|
static int |
addServerStatsEvent(java.lang.String name)
Register an event type. |
static long |
getCount(int eventType)
Get the current event count for the specified event type. |
static java.util.Map |
getCurrentStats(boolean resetCounters)
Gets a hash map of the top-level entries in current (in-memory) statistics. |
static int |
getKeyIntValue(java.lang.String key)
Gets the int value corresponding to an event name. |
static java.lang.String |
getName(int index)
Gets the name corresponding to an event index. |
static com.bowstreet.appserver.logmanager.ServerStatsLog |
getServerStatsLog(boolean resetCounters)
Gets all the current values in format suitable for writing to file. |
static java.lang.String[] |
getStatsAttributes()
|
static boolean |
isRunModelOnly(int index)
See if an entry is obsolete RunModel |
static void |
logEvent(int eventType)
Increment the counter for an event. |
static void |
logTimedEvent(int eventType,
long elapsed)
Log a single action, with its elapsed clock time. |
static void |
logTimedEvent(int eventType,
long elapsed,
java.lang.String name,
java.lang.String childName)
Log action, with name, sub-name and an elapsed time. |
static void |
setEntry(int eventType,
long value)
Set the count of an event type to a specific value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STAT_ActiveSessions
public static final int STAT_EngineRequests
public static final int STAT_ErrorsLogged
public static final int STAT_MemFree
public static final int STAT_MemInUse
public static final int STAT_MemTotal
public static final int STAT_MethodCacheEntries
public static final int STAT_ModelCacheEntries
public static final int STAT_ModelCacheRegenEntries
public static final int STAT_ModelsInSessions
public static final int STAT_ModelsInstantiated
public static final int STAT_ModelXmlCacheEntries
public static final int STAT_OutputCacheHits
public static final int STAT_OutputCacheMisses
public static final int STAT_ParallelModelRequests
public static final int STAT_PeakSessions
public static final int STAT_ProfileCacheHits
public static final int STAT_ProfileCacheMisses
public static final int STAT_ProfileSetCacheHits
public static final int STAT_ProfileSetCacheMisses
public static final int STAT_Regens
public static final int STAT_RegensFromCache
public static final int STAT_RestoredSessions
public static final int STAT_SchemaCacheEntries
public static final int STAT_SchemaCacheHits
public static final int STAT_SchemaCacheMisses
public static final int STAT_Sessions
public static final int STAT_SevereErrorsLogged
public static final int STAT_WarningsLogged
public static final int STAT_WebAppJSPSourceWritten
public static final int STAT_WebAppMethodClassWritten
public static final int STAT_WebAppRequests
public static final int STAT_WebAppsInSessions
public static final int STAT_WebAppsInstantiated
public static final int STAT_WebAppSOAPRequests
public static int statCount
Constructor Detail |
---|
public ServerStats()
Method Detail |
---|
public static int addServerStatsEvent(java.lang.String name)
name
- The name that you want to appear in the server stats file.
public static long getCount(int eventType)
eventType
- The index of the event
public static java.util.Map getCurrentStats(boolean resetCounters)
public static int getKeyIntValue(java.lang.String key)
key
- The name as shown in the server stats file.
public static java.lang.String getName(int index)
index
- The integer index for an event.
public static com.bowstreet.appserver.logmanager.ServerStatsLog getServerStatsLog(boolean resetCounters)
public static java.lang.String[] getStatsAttributes()
public static boolean isRunModelOnly(int index)
public static void logEvent(int eventType)
eventType
- The index of the event. This can be a predefined event
or a user-defined event returned from addServerStatsEvent.logEvent(ServerStats.STAT_Regens);
public static void logTimedEvent(int eventType, long elapsed)
eventType
- The index of the event. This can be a predefined event
or a user-defined event returned from addServerStatsEvent.elapsed
- The time for this event.public static void logTimedEvent(int eventType, long elapsed, java.lang.String name, java.lang.String childName)
eventType
- The index of the event. This can be a predefined event
or a user-defined event returned from addServerStatsEvent.ServerStats.logTimedEvent(ServerStats.STAT_ModelRequest, elapsed, modelID, pageID);
public static void setEntry(int eventType, long value)
eventType
- The index of the event.value
- the value that this event entry be set to.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |