Class LocalQueryStatistics
java.lang.Object
org.infinispan.query.core.stats.impl.LocalQueryStatistics
- All Implemented Interfaces:
JsonSerialization, QueryStatistics, QueryStatisticsSnapshot
@ProtoTypeId(4202)
public class LocalQueryStatistics
extends Object
implements QueryStatisticsSnapshot
Manages query statistics for a Cache.
- Since:
- 12.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all statistics.voiddistributedIndexedQueryExecuted(String q, long timeNanos) voidentityLoaded(long timeNanos) protected org.infinispan.query.core.stats.impl.QueryMetricsdoublelonglonglongprotected org.infinispan.query.core.stats.impl.QueryMetricsdoublelonglonglongdoublelonglongorg.infinispan.query.core.stats.impl.QueryMetricsgetLoads()longprotected org.infinispan.query.core.stats.impl.QueryMetricsdoublelonglonglongprotected org.infinispan.query.core.stats.impl.QueryMetricsdoublelonglonglongvoidhybridQueryExecuted(String q, long timeNanos) booleanvoidlocalIndexedQueryExecuted(String q, long timeNanos) merge(QueryStatisticsSnapshot other) Merge with anotherQueryStatisticsSnapshotvoidnonIndexedQueryExecuted(String q, long timeNanos) toJson()toString()
-
Constructor Details
-
LocalQueryStatistics
public LocalQueryStatistics()
-
-
Method Details
-
localIndexedQueryExecuted
-
distributedIndexedQueryExecuted
-
hybridQueryExecuted
-
nonIndexedQueryExecuted
-
entityLoaded
public void entityLoaded(long timeNanos) -
getLocalIndexedQueryCount
public long getLocalIndexedQueryCount()- Specified by:
getLocalIndexedQueryCountin interfaceQueryStatistics- Returns:
- Number of queries executed in the local index.
-
getDistributedIndexedQueryCount
public long getDistributedIndexedQueryCount()- Specified by:
getDistributedIndexedQueryCountin interfaceQueryStatistics- Returns:
- Number of distributed indexed queries executed from the local node.
-
getHybridQueryCount
public long getHybridQueryCount()- Specified by:
getHybridQueryCountin interfaceQueryStatistics- Returns:
- Number of hybrid queries (two phase indexed and non-indexed) executed from the local node.
-
getNonIndexedQueryCount
public long getNonIndexedQueryCount()- Specified by:
getNonIndexedQueryCountin interfaceQueryStatistics- Returns:
- Number of non-indexed queries executed from the local node.
-
getLocalIndexedQueryTotalTime
public long getLocalIndexedQueryTotalTime()- Specified by:
getLocalIndexedQueryTotalTimein interfaceQueryStatistics- Returns:
- The total time in nanoseconds of all indexed queries.
-
getDistributedIndexedQueryTotalTime
public long getDistributedIndexedQueryTotalTime()- Specified by:
getDistributedIndexedQueryTotalTimein interfaceQueryStatistics- Returns:
- The total time in nanoseconds of all distributed indexed queries.
-
getHybridQueryTotalTime
public long getHybridQueryTotalTime()- Specified by:
getHybridQueryTotalTimein interfaceQueryStatistics- Returns:
- The total time in nanoseconds for all hybrid queries.
-
getNonIndexedQueryTotalTime
public long getNonIndexedQueryTotalTime()- Specified by:
getNonIndexedQueryTotalTimein interfaceQueryStatistics- Returns:
- The total time in nanoseconds for all non-indexed queries.
-
getLocalIndexedQueryMaxTime
public long getLocalIndexedQueryMaxTime()- Specified by:
getLocalIndexedQueryMaxTimein interfaceQueryStatistics- Returns:
- The time in nanoseconds of the slowest indexed query.
-
getDistributedIndexedQueryMaxTime
public long getDistributedIndexedQueryMaxTime()- Specified by:
getDistributedIndexedQueryMaxTimein interfaceQueryStatistics- Returns:
- The time in nanoseconds of the slowest distributed indexed query.
-
getHybridQueryMaxTime
public long getHybridQueryMaxTime()- Specified by:
getHybridQueryMaxTimein interfaceQueryStatistics- Returns:
- The time in nanoseconds of the slowest hybrid query.
-
getNonIndexedQueryMaxTime
public long getNonIndexedQueryMaxTime()- Specified by:
getNonIndexedQueryMaxTimein interfaceQueryStatistics- Returns:
- The time in nanoseconds of the slowest non-indexed query.
-
getLocalIndexedQueryAvgTime
public double getLocalIndexedQueryAvgTime()- Specified by:
getLocalIndexedQueryAvgTimein interfaceQueryStatistics- Returns:
- The average time in nanoseconds of all indexed queries.
-
getDistributedIndexedQueryAvgTime
public double getDistributedIndexedQueryAvgTime()- Specified by:
getDistributedIndexedQueryAvgTimein interfaceQueryStatistics- Returns:
- The average time in nanoseconds of all distributed indexed queries.
-
getHybridQueryAvgTime
public double getHybridQueryAvgTime()- Specified by:
getHybridQueryAvgTimein interfaceQueryStatistics- Returns:
- The average time in nanoseconds of all hybrid indexed queries.
-
getNonIndexedQueryAvgTime
public double getNonIndexedQueryAvgTime()- Specified by:
getNonIndexedQueryAvgTimein interfaceQueryStatistics- Returns:
- The average time in nanoseconds of all non-indexed indexed queries.
-
getSlowestLocalIndexedQuery
- Specified by:
getSlowestLocalIndexedQueryin interfaceQueryStatistics- Returns:
- The Ickle query string of the slowest indexed query.
-
getSlowestDistributedIndexedQuery
- Specified by:
getSlowestDistributedIndexedQueryin interfaceQueryStatistics- Returns:
- The Ickle query string of the slowest distributed indexed query.
-
getSlowestHybridQuery
- Specified by:
getSlowestHybridQueryin interfaceQueryStatistics- Returns:
- The Ickle query string of the slowest hybrid query.
-
getSlowestNonIndexedQuery
- Specified by:
getSlowestNonIndexedQueryin interfaceQueryStatistics- Returns:
- The Ickle query string of the slowest non-indexed query.
-
getLoadMaxTime
public long getLoadMaxTime()- Specified by:
getLoadMaxTimein interfaceQueryStatistics- Returns:
- The max time in nanoseconds to load entities from a Cache after an indexed query.
-
getLoadAvgTime
public double getLoadAvgTime()- Specified by:
getLoadAvgTimein interfaceQueryStatistics- Returns:
- The average time in nanoseconds to load entities from a Cache after an indexed query.
-
getLoadCount
public long getLoadCount()- Specified by:
getLoadCountin interfaceQueryStatistics- Returns:
- The number of entities loaded from a Cache after an indexed query.
-
getLoadTotalTime
public long getLoadTotalTime()- Specified by:
getLoadTotalTimein interfaceQueryStatistics- Returns:
- The total time to load entities from a Cache after an indexed query.
-
getLocalIndexedQueries
protected org.infinispan.query.core.stats.impl.QueryMetrics getLocalIndexedQueries() -
getDistIndexedQueries
protected org.infinispan.query.core.stats.impl.QueryMetrics getDistIndexedQueries() -
getHybridQueries
protected org.infinispan.query.core.stats.impl.QueryMetrics getHybridQueries() -
getNonIndexedQueries
protected org.infinispan.query.core.stats.impl.QueryMetrics getNonIndexedQueries() -
getLoads
public org.infinispan.query.core.stats.impl.QueryMetrics getLoads() -
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceQueryStatistics- Returns:
- true if the Cache has statistics enabled.
-
computeSnapshot
- Specified by:
computeSnapshotin interfaceQueryStatistics- Specified by:
computeSnapshotin interfaceQueryStatisticsSnapshot- Returns:
- A snapshot of self.
-
clear
public void clear()Description copied from interface:QueryStatisticsClear all statistics.- Specified by:
clearin interfaceQueryStatistics
-
merge
Description copied from interface:QueryStatisticsSnapshotMerge with anotherQueryStatisticsSnapshot- Specified by:
mergein interfaceQueryStatisticsSnapshot- Returns:
- self.
-
toJson
- Specified by:
toJsonin interfaceJsonSerialization
-
toString
-