Package org.hibernate.search.stat
Class StatisticsImpl
java.lang.Object
org.hibernate.search.stat.StatisticsImpl
- All Implemented Interfaces:
Statistics,StatisticsImplementor
A concurrent implementation of the
Statistics interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Reset all statistics.Returns a list of all indexed classes.intgetNumberOfIndexedEntities(String entity) Returns the number of documents for the given entity.longGet the average object loading time in nanoseconds.longGet the time in nanoseconds for the slowest object load.longGet the total object loading in nanoseconds.longGets the total number of objects loadedlongGet the average search time in nanoseconds.longGet global number of executed search querieslongGet the time in nanoseconds of the slowest search.Get the query string for the slowest query.longGet the total search time in nanoseconds.Returns the Hibernate Search version.Returns a map of all indexed entities and their document count in the index.booleanAre statistics loggedvoidobjectLoadExecuted(long numberOfObjectsLoaded, long time) Callback for number of object loaded from the db.voidsearchExecuted(String searchString, long time) Callback for an executed Lucene search.voidsetStatisticsEnabled(boolean b) Enable statistics logs (this is a dynamic parameter)
-
Constructor Details
-
StatisticsImpl
-
-
Method Details
-
clear
public void clear()Description copied from interface:StatisticsReset all statistics.- Specified by:
clearin interfaceStatistics
-
getSearchQueryExecutionCount
public long getSearchQueryExecutionCount()Description copied from interface:StatisticsGet global number of executed search queries- Specified by:
getSearchQueryExecutionCountin interfaceStatistics- Returns:
- search query execution count
-
getSearchQueryTotalTime
public long getSearchQueryTotalTime()Description copied from interface:StatisticsGet the total search time in nanoseconds.- Specified by:
getSearchQueryTotalTimein interfaceStatistics
-
getSearchQueryExecutionMaxTime
public long getSearchQueryExecutionMaxTime()Description copied from interface:StatisticsGet the time in nanoseconds of the slowest search.- Specified by:
getSearchQueryExecutionMaxTimein interfaceStatistics
-
getSearchQueryExecutionAvgTime
public long getSearchQueryExecutionAvgTime()Description copied from interface:StatisticsGet the average search time in nanoseconds.- Specified by:
getSearchQueryExecutionAvgTimein interfaceStatistics
-
getSearchQueryExecutionMaxTimeQueryString
Description copied from interface:StatisticsGet the query string for the slowest query.- Specified by:
getSearchQueryExecutionMaxTimeQueryStringin interfaceStatistics
-
searchExecuted
Description copied from interface:StatisticsImplementorCallback for an executed Lucene search.- Specified by:
searchExecutedin interfaceStatisticsImplementor- Parameters:
searchString- executed query stringtime- time in nanoseconds to execute the search
-
getObjectsLoadedCount
public long getObjectsLoadedCount()Description copied from interface:StatisticsGets the total number of objects loaded- Specified by:
getObjectsLoadedCountin interfaceStatistics
-
getObjectLoadingTotalTime
public long getObjectLoadingTotalTime()Description copied from interface:StatisticsGet the total object loading in nanoseconds.- Specified by:
getObjectLoadingTotalTimein interfaceStatistics
-
getObjectLoadingExecutionMaxTime
public long getObjectLoadingExecutionMaxTime()Description copied from interface:StatisticsGet the time in nanoseconds for the slowest object load.- Specified by:
getObjectLoadingExecutionMaxTimein interfaceStatistics
-
getObjectLoadingExecutionAvgTime
public long getObjectLoadingExecutionAvgTime()Description copied from interface:StatisticsGet the average object loading time in nanoseconds.- Specified by:
getObjectLoadingExecutionAvgTimein interfaceStatistics
-
objectLoadExecuted
public void objectLoadExecuted(long numberOfObjectsLoaded, long time) Description copied from interface:StatisticsImplementorCallback for number of object loaded from the db.- Specified by:
objectLoadExecutedin interfaceStatisticsImplementor- Parameters:
numberOfObjectsLoaded- Number of objects loadedtime- time in nanoseconds to load the objects
-
isStatisticsEnabled
public boolean isStatisticsEnabled()Description copied from interface:StatisticsAre statistics logged- Specified by:
isStatisticsEnabledin interfaceStatistics
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean b) Description copied from interface:StatisticsEnable statistics logs (this is a dynamic parameter)- Specified by:
setStatisticsEnabledin interfaceStatistics
-
getSearchVersion
Description copied from interface:StatisticsReturns the Hibernate Search version.- Specified by:
getSearchVersionin interfaceStatistics- Returns:
- the Hibernate Search version
-
getIndexedClassNames
Description copied from interface:StatisticsReturns a list of all indexed classes.- Specified by:
getIndexedClassNamesin interfaceStatistics- Returns:
- list of all indexed classes
-
getNumberOfIndexedEntities
Description copied from interface:StatisticsReturns the number of documents for the given entity.- Specified by:
getNumberOfIndexedEntitiesin interfaceStatistics- Parameters:
entity- the fqc of the entity- Returns:
- number of documents for the specified entity name
-
indexedEntitiesCount
Description copied from interface:StatisticsReturns a map of all indexed entities and their document count in the index.- Specified by:
indexedEntitiesCountin interfaceStatistics- Returns:
- a map of all indexed entities and their document count. The map key is the fqc of the entity and the map value is the document count.
-