Top Description Fields Constructors Methods
org.hibernate.stat

public Class QueryStatisticsImpl

extends CategorizedStatistics
implements QueryStatistics
Class Inheritance
All Implemented Interfaces
org.hibernate.stat.QueryStatistics, java.io.Serializable

Query statistics (HQL and SQL)

Note that for a cached query, the cache miss is equals to the db count

Author
Gavin King

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv long
pack-priv long
private long
private long
private long
private long
private long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
executed(long
rows count returned
rows
,
long
time taken
time
)

add statistics report of a DB query

public long
getCacheHitCount()

Implements org.hibernate.stat.QueryStatistics.getCacheHitCount.

Queries retrieved successfully from the cache
public long
public long
public long
getExecutionAvgTime()

Implements org.hibernate.stat.QueryStatistics.getExecutionAvgTime.

average time in ms taken by the execution of this query onto the DB
public long
public long
getExecutionMaxTime()

Implements org.hibernate.stat.QueryStatistics.getExecutionMaxTime.

max time in ms taken by the execution of this query onto the DB
public long
getExecutionMinTime()

Implements org.hibernate.stat.QueryStatistics.getExecutionMinTime.

min time in ms taken by the execution of this query onto the DB
public long

Returns:

The number of rows cumulatively returned by the given query; iterate and scroll queries do not effect this total as their number of returned rows is not known at execution time.
getExecutionRowCount
()

Implements org.hibernate.stat.QueryStatistics.getExecutionRowCount.

Number of lines returned by all the executions of this query (from DB) For now, org.hibernate.Query#iterate() and org.hibernate.Query#scroll()() do not fill this statistic
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.stat.CategorizedStatistics:
getCategoryName

Field Detail

cacheHitCountback to summary
pack-priv long cacheHitCount
cacheMissCountback to summary
pack-priv long cacheMissCount
cachePutCountback to summary
pack-priv long cachePutCount
executionAvgTimeback to summary
private long executionAvgTime
executionCountback to summary
private long executionCount
executionMaxTimeback to summary
private long executionMaxTime
executionMinTimeback to summary
private long executionMinTime
executionRowCountback to summary
private long executionRowCount

Constructor Detail

QueryStatisticsImplback to summary
pack-priv QueryStatisticsImpl(String query)

Method Detail

executedback to summary
pack-priv void executed(long rows, long time)

add statistics report of a DB query

Parameters
rows:long

rows count returned

time:long

time taken

getCacheHitCountback to summary
public long getCacheHitCount()

Implements org.hibernate.stat.QueryStatistics.getCacheHitCount.

Queries retrieved successfully from the cache

getCacheMissCountback to summary
public long getCacheMissCount()

Implements org.hibernate.stat.QueryStatistics.getCacheMissCount.

getCachePutCountback to summary
public long getCachePutCount()

Implements org.hibernate.stat.QueryStatistics.getCachePutCount.

getExecutionAvgTimeback to summary
public long getExecutionAvgTime()

Implements org.hibernate.stat.QueryStatistics.getExecutionAvgTime.

average time in ms taken by the execution of this query onto the DB

getExecutionCountback to summary
public long getExecutionCount()

Implements org.hibernate.stat.QueryStatistics.getExecutionCount.

queries executed to the DB

getExecutionMaxTimeback to summary
public long getExecutionMaxTime()

Implements org.hibernate.stat.QueryStatistics.getExecutionMaxTime.

max time in ms taken by the execution of this query onto the DB

getExecutionMinTimeback to summary
public long getExecutionMinTime()

Implements org.hibernate.stat.QueryStatistics.getExecutionMinTime.

min time in ms taken by the execution of this query onto the DB

getExecutionRowCountback to summary
public long getExecutionRowCount()

Implements org.hibernate.stat.QueryStatistics.getExecutionRowCount.

Number of lines returned by all the executions of this query (from DB) For now, org.hibernate.Query#iterate() and org.hibernate.Query#scroll()() do not fill this statistic

Returns:long

The number of rows cumulatively returned by the given query; iterate and scroll queries do not effect this total as their number of returned rows is not known at execution time.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.