public class StatisticsImpl extends Object implements Statistics, StatisticsImplementor
Statistics interface.| Constructor and Description |
|---|
StatisticsImpl(ExtendedSearchIntegrator extendedIntegrator) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Reset all statistics.
|
Set<String> |
getIndexedClassNames()
Returns a list of all indexed classes.
|
int |
getNumberOfIndexedEntities(String entity)
Returns the number of documents for the given entity.
|
long |
getObjectLoadingExecutionAvgTime() |
long |
getObjectLoadingExecutionMaxTime() |
long |
getObjectLoadingTotalTime() |
long |
getObjectsLoadedCount() |
long |
getSearchQueryExecutionAvgTime()
Get the average search time in nanoseconds.
|
long |
getSearchQueryExecutionCount()
Get global number of executed search queries
|
long |
getSearchQueryExecutionMaxTime()
Get the time in nanoseconds of the slowest search.
|
String |
getSearchQueryExecutionMaxTimeQueryString()
Get the query string for the slowest query.
|
long |
getSearchQueryTotalTime()
Get the total search time in nanoseconds.
|
String |
getSearchVersion()
Returns the Hibernate Search version.
|
Map<String,Integer> |
indexedEntitiesCount()
Returns a map of all indexed entities and their document count in the index.
|
boolean |
isStatisticsEnabled() |
void |
objectLoadExecuted(long numberOfObjectsLoaded,
long time)
Callback for number of object loaded from the db.
|
void |
searchExecuted(String searchString,
long time)
Callback for an executed Lucene search.
|
void |
setStatisticsEnabled(boolean b)
Enable statistics logs (this is a dynamic parameter)
|
public StatisticsImpl(ExtendedSearchIntegrator extendedIntegrator)
public void clear()
Statisticsclear in interface Statisticspublic long getSearchQueryExecutionCount()
StatisticsgetSearchQueryExecutionCount in interface Statisticspublic long getSearchQueryTotalTime()
StatisticsgetSearchQueryTotalTime in interface Statisticspublic long getSearchQueryExecutionMaxTime()
StatisticsgetSearchQueryExecutionMaxTime in interface Statisticspublic long getSearchQueryExecutionAvgTime()
StatisticsgetSearchQueryExecutionAvgTime in interface Statisticspublic String getSearchQueryExecutionMaxTimeQueryString()
StatisticsgetSearchQueryExecutionMaxTimeQueryString in interface Statisticspublic void searchExecuted(String searchString, long time)
StatisticsImplementorsearchExecuted in interface StatisticsImplementorsearchString - executed query stringtime - time in nanoseconds to execute the searchpublic long getObjectsLoadedCount()
getObjectsLoadedCount in interface Statisticspublic long getObjectLoadingTotalTime()
getObjectLoadingTotalTime in interface Statisticspublic long getObjectLoadingExecutionMaxTime()
getObjectLoadingExecutionMaxTime in interface Statisticspublic long getObjectLoadingExecutionAvgTime()
getObjectLoadingExecutionAvgTime in interface Statisticspublic void objectLoadExecuted(long numberOfObjectsLoaded,
long time)
StatisticsImplementorobjectLoadExecuted in interface StatisticsImplementornumberOfObjectsLoaded - Number of objects loadedtime - time in nanoseconds to load the objectspublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface Statisticstrue if statistics are enabled, false otherwisepublic void setStatisticsEnabled(boolean b)
StatisticssetStatisticsEnabled in interface Statisticsb - if true, it enables the statistics.public String getSearchVersion()
StatisticsgetSearchVersion in interface Statisticspublic Set<String> getIndexedClassNames()
StatisticsgetIndexedClassNames in interface Statisticspublic int getNumberOfIndexedEntities(String entity)
StatisticsgetNumberOfIndexedEntities in interface Statisticsentity - the fqc of the entitypublic Map<String,Integer> indexedEntitiesCount()
StatisticsindexedEntitiesCount in interface StatisticsCopyright © 2006–2017 Hibernate. All rights reserved.