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()
Statistics
clear
in interface Statistics
public long getSearchQueryExecutionCount()
Statistics
getSearchQueryExecutionCount
in interface Statistics
public long getSearchQueryTotalTime()
Statistics
getSearchQueryTotalTime
in interface Statistics
public long getSearchQueryExecutionMaxTime()
Statistics
getSearchQueryExecutionMaxTime
in interface Statistics
public long getSearchQueryExecutionAvgTime()
Statistics
getSearchQueryExecutionAvgTime
in interface Statistics
public String getSearchQueryExecutionMaxTimeQueryString()
Statistics
getSearchQueryExecutionMaxTimeQueryString
in interface Statistics
public void searchExecuted(String searchString, long time)
StatisticsImplementor
searchExecuted
in interface StatisticsImplementor
searchString
- executed query stringtime
- time in nanoseconds to execute the searchpublic long getObjectsLoadedCount()
getObjectsLoadedCount
in interface Statistics
public long getObjectLoadingTotalTime()
getObjectLoadingTotalTime
in interface Statistics
public long getObjectLoadingExecutionMaxTime()
getObjectLoadingExecutionMaxTime
in interface Statistics
public long getObjectLoadingExecutionAvgTime()
getObjectLoadingExecutionAvgTime
in interface Statistics
public void objectLoadExecuted(long numberOfObjectsLoaded, long time)
StatisticsImplementor
objectLoadExecuted
in interface StatisticsImplementor
numberOfObjectsLoaded
- Number of objects loadedtime
- time in nanoseconds to load the objectspublic boolean isStatisticsEnabled()
isStatisticsEnabled
in interface Statistics
true
if statistics are enabled, false
otherwisepublic void setStatisticsEnabled(boolean b)
Statistics
setStatisticsEnabled
in interface Statistics
b
- if true
, it enables the statistics.public String getSearchVersion()
Statistics
getSearchVersion
in interface Statistics
public Set<String> getIndexedClassNames()
Statistics
getIndexedClassNames
in interface Statistics
public int getNumberOfIndexedEntities(String entity)
Statistics
getNumberOfIndexedEntities
in interface Statistics
entity
- the fqc of the entitypublic Map<String,Integer> indexedEntitiesCount()
Statistics
indexedEntitiesCount
in interface Statistics
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved