|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Statistics for a particular SessionFactory. Beware of milliseconds metrics, they are depdendent of the JVM precision: you may then encounter a 10 ms approximation dending on you OS platform. Please refer to the JVM documentation for more information.
Method Summary | |
void |
clear()
reset all statistics |
long |
getCloseStatementCount()
The number of prepared statements that were released |
long |
getCollectionFetchCount()
Global number of collections fetched |
long |
getCollectionLoadCount()
Global number of collections loaded |
long |
getCollectionRecreateCount()
Global number of collections recreated |
long |
getCollectionRemoveCount()
Global number of collections removed |
String[] |
getCollectionRoleNames()
Get the names of all collection roles |
CollectionStatistics |
getCollectionStatistics(String role)
Get collection statistics per role |
long |
getCollectionUpdateCount()
Global number of collections updated |
long |
getConnectCount()
Get the global number of connections asked by the sessions (the actual number of connections used may be much smaller depending whether you use a connection pool or not) |
long |
getEntityDeleteCount()
Get global number of entity deletes |
long |
getEntityFetchCount()
Get global number of entity fetchs |
long |
getEntityInsertCount()
Get global number of entity inserts |
long |
getEntityLoadCount()
Get global number of entity loads |
String[] |
getEntityNames()
Get the names of all entities |
EntityStatistics |
getEntityStatistics(String entityName)
find entity statistics per name |
long |
getEntityUpdateCount()
Get global number of entity updates |
long |
getFlushCount()
Get the global number of flush executed by sessions (either implicit or explicit) |
long |
getOptimisticFailureCount()
The number of StaleObjectStateExceptions that occurred |
long |
getPrepareStatementCount()
The number of prepared statements that were acquired |
String[] |
getQueries()
Get all executed query strings |
long |
getQueryCacheHitCount()
Get the global number of cached queries successfully retrieved from cache |
long |
getQueryCacheMissCount()
Get the global number of cached queries *not* found in cache |
long |
getQueryCachePutCount()
Get the global number of cacheable queries put in cache |
long |
getQueryExecutionCount()
Get global number of executed queries |
long |
getQueryExecutionMaxTime()
Get the time in milliseconds of the slowest query. |
String |
getQueryExecutionMaxTimeQueryString()
Get the query string for the slowest query. |
QueryStatistics |
getQueryStatistics(String queryString)
Query statistics from query string (HQL or SQL) |
long |
getSecondLevelCacheHitCount()
Global number of cacheable entities/collections successfully retrieved from the cache |
long |
getSecondLevelCacheMissCount()
Global number of cacheable entities/collections not found in the cache and loaded from the database. |
long |
getSecondLevelCachePutCount()
Global number of cacheable entities/collections put in the cache |
String[] |
getSecondLevelCacheRegionNames()
Get all second-level cache region names |
SecondLevelCacheStatistics |
getSecondLevelCacheStatistics(String regionName)
Second level cache statistics per region |
long |
getSessionCloseCount()
Global number of sessions closed |
long |
getSessionOpenCount()
Global number of sessions opened |
long |
getStartTime()
|
long |
getSuccessfulTransactionCount()
The number of transactions we know to have been successful |
long |
getTransactionCount()
The number of transactions we know to have completed |
boolean |
isStatisticsEnabled()
Are statistics logged |
void |
logSummary()
log in info level the main statistics |
void |
setStatisticsEnabled(boolean b)
Enable statistics logs (this is a dynamic parameter) |
Method Detail |
public void clear()
public EntityStatistics getEntityStatistics(String entityName)
entityName
- entity name
public CollectionStatistics getCollectionStatistics(String role)
role
- collection role
public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
regionName
- region name
public QueryStatistics getQueryStatistics(String queryString)
queryString
- query string
public long getEntityDeleteCount()
public long getEntityInsertCount()
public long getEntityLoadCount()
public long getEntityFetchCount()
public long getEntityUpdateCount()
public long getQueryExecutionCount()
public long getQueryExecutionMaxTime()
public String getQueryExecutionMaxTimeQueryString()
public long getQueryCacheHitCount()
public long getQueryCacheMissCount()
public long getQueryCachePutCount()
public long getFlushCount()
public long getConnectCount()
public long getSecondLevelCacheHitCount()
public long getSecondLevelCacheMissCount()
public long getSecondLevelCachePutCount()
public long getSessionCloseCount()
public long getSessionOpenCount()
public long getCollectionLoadCount()
public long getCollectionFetchCount()
public long getCollectionUpdateCount()
public long getCollectionRemoveCount()
public long getCollectionRecreateCount()
public long getStartTime()
System.currentTimeMillis()
)public void logSummary()
public boolean isStatisticsEnabled()
public void setStatisticsEnabled(boolean b)
public String[] getQueries()
public String[] getEntityNames()
public String[] getCollectionRoleNames()
public String[] getSecondLevelCacheRegionNames()
public long getSuccessfulTransactionCount()
public long getTransactionCount()
public long getPrepareStatementCount()
public long getCloseStatementCount()
public long getOptimisticFailureCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |