Package org.hibernate.search.stat
Interface Statistics
- All Known Subinterfaces:
StatisticsInfoMBean
- All Known Implementing Classes:
StatisticsImpl,StatisticsInfo
public interface Statistics
Interface which defines several methods allowing to access statistical data. This includes average and maximum
Lucene query time and object loading time.
-
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 loggedvoidsetStatisticsEnabled(boolean b) Enable statistics logs (this is a dynamic parameter)
-
Method Details
-
clear
void clear()Reset all statistics. -
getSearchQueryExecutionCount
long getSearchQueryExecutionCount()Get global number of executed search queries- Returns:
- search query execution count
-
getSearchQueryTotalTime
long getSearchQueryTotalTime()Get the total search time in nanoseconds. -
getSearchQueryExecutionMaxTime
long getSearchQueryExecutionMaxTime()Get the time in nanoseconds of the slowest search. -
getSearchQueryExecutionAvgTime
long getSearchQueryExecutionAvgTime()Get the average search time in nanoseconds. -
getSearchQueryExecutionMaxTimeQueryString
String getSearchQueryExecutionMaxTimeQueryString()Get the query string for the slowest query. -
getObjectLoadingTotalTime
long getObjectLoadingTotalTime()Get the total object loading in nanoseconds. -
getObjectLoadingExecutionMaxTime
long getObjectLoadingExecutionMaxTime()Get the time in nanoseconds for the slowest object load. -
getObjectLoadingExecutionAvgTime
long getObjectLoadingExecutionAvgTime()Get the average object loading time in nanoseconds. -
getObjectsLoadedCount
long getObjectsLoadedCount()Gets the total number of objects loaded -
isStatisticsEnabled
boolean isStatisticsEnabled()Are statistics logged -
setStatisticsEnabled
void setStatisticsEnabled(boolean b) Enable statistics logs (this is a dynamic parameter) -
getSearchVersion
String getSearchVersion()Returns the Hibernate Search version.- Returns:
- the Hibernate Search version
-
getIndexedClassNames
Returns a list of all indexed classes.- Returns:
- list of all indexed classes
-
getNumberOfIndexedEntities
Returns the number of documents for the given entity.- Parameters:
entity- the fqc of the entity- Returns:
- number of documents for the specified entity name
- Throws:
IllegalArgumentException- in case the entity name is not valid
-
indexedEntitiesCount
Returns a map of all indexed entities and their document count in the index.- 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.
-