Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » stat » [javadoc | source]
org.hibernate.stat
public interface: Statistics [javadoc | source]

All Known Implementing Classes:
    StatisticsService, StatisticsServiceMBean, StatisticsImpl

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 from org.hibernate.stat.Statistics Summary:
clear,   getCloseStatementCount,   getCollectionFetchCount,   getCollectionLoadCount,   getCollectionRecreateCount,   getCollectionRemoveCount,   getCollectionRoleNames,   getCollectionStatistics,   getCollectionUpdateCount,   getConnectCount,   getEntityDeleteCount,   getEntityFetchCount,   getEntityInsertCount,   getEntityLoadCount,   getEntityNames,   getEntityStatistics,   getEntityUpdateCount,   getFlushCount,   getOptimisticFailureCount,   getPrepareStatementCount,   getQueries,   getQueryCacheHitCount,   getQueryCacheMissCount,   getQueryCachePutCount,   getQueryExecutionCount,   getQueryExecutionMaxTime,   getQueryExecutionMaxTimeQueryString,   getQueryStatistics,   getSecondLevelCacheHitCount,   getSecondLevelCacheMissCount,   getSecondLevelCachePutCount,   getSecondLevelCacheRegionNames,   getSecondLevelCacheStatistics,   getSessionCloseCount,   getSessionOpenCount,   getStartTime,   getSuccessfulTransactionCount,   getTransactionCount,   isStatisticsEnabled,   logSummary,   setStatisticsEnabled
Method from org.hibernate.stat.Statistics Detail:
 public  void clear()
    reset all statistics
 public long getCloseStatementCount()
    The number of prepared statements that were released
 public long getCollectionFetchCount()
    Global number of collections fetched
 public long getCollectionLoadCount()
    Global number of collections loaded
 public long getCollectionRecreateCount()
    Global number of collections recreated
 public long getCollectionRemoveCount()
    Global number of collections removed
 public String[] getCollectionRoleNames()
    Get the names of all collection roles
 public CollectionStatistics getCollectionStatistics(String role)
    Get collection statistics per role
 public long getCollectionUpdateCount()
    Global number of collections updated
 public 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)
 public long getEntityDeleteCount()
    Get global number of entity deletes
 public long getEntityFetchCount()
    Get global number of entity fetchs
 public long getEntityInsertCount()
    Get global number of entity inserts
 public long getEntityLoadCount()
    Get global number of entity loads
 public String[] getEntityNames()
    Get the names of all entities
 public EntityStatistics getEntityStatistics(String entityName)
    find entity statistics per name
 public long getEntityUpdateCount()
    Get global number of entity updates
 public long getFlushCount()
    Get the global number of flush executed by sessions (either implicit or explicit)
 public long getOptimisticFailureCount()
    The number of StaleObjectStateExceptions that occurred
 public long getPrepareStatementCount()
    The number of prepared statements that were acquired
 public String[] getQueries()
    Get all executed query strings
 public long getQueryCacheHitCount()
    Get the global number of cached queries successfully retrieved from cache
 public long getQueryCacheMissCount()
    Get the global number of cached queries *not* found in cache
 public long getQueryCachePutCount()
    Get the global number of cacheable queries put in cache
 public long getQueryExecutionCount()
    Get global number of executed queries
 public long getQueryExecutionMaxTime()
    Get the time in milliseconds of the slowest query.
 public String getQueryExecutionMaxTimeQueryString()
    Get the query string for the slowest query.
 public QueryStatistics getQueryStatistics(String queryString)
    Query statistics from query string (HQL or SQL)
 public long getSecondLevelCacheHitCount()
    Global number of cacheable entities/collections successfully retrieved from the cache
 public long getSecondLevelCacheMissCount()
    Global number of cacheable entities/collections not found in the cache and loaded from the database.
 public long getSecondLevelCachePutCount()
    Global number of cacheable entities/collections put in the cache
 public String[] getSecondLevelCacheRegionNames()
    Get all second-level cache region names
 public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName)
    Second level cache statistics per region
 public long getSessionCloseCount()
    Global number of sessions closed
 public long getSessionOpenCount()
    Global number of sessions opened
 public long getStartTime()
 public long getSuccessfulTransactionCount()
    The number of transactions we know to have been successful
 public long getTransactionCount()
    The number of transactions we know to have completed
 public boolean isStatisticsEnabled()
    Are statistics logged
 public  void logSummary()
    log in info level the main statistics
 public  void setStatisticsEnabled(boolean b)
    Enable statistics logs (this is a dynamic parameter)