Methods Summary |
---|
void | executed(long rows, long time)add statistics report of a DB query
if (time < executionMinTime) executionMinTime = time;
if (time > executionMaxTime) executionMaxTime = time;
executionAvgTime = ( executionAvgTime * executionCount + time ) / ( executionCount + 1 );
executionCount++;
executionRowCount += rows;
|
public long | getCacheHitCount()Queries retrieved successfully from the cache
return cacheHitCount;
|
public long | getCacheMissCount()
return cacheMissCount;
|
public long | getCachePutCount()
return cachePutCount;
|
public long | getExecutionAvgTime()average time in ms taken by the excution of this query onto the DB
return executionAvgTime;
|
public long | getExecutionCount()queries executed to the DB
return executionCount;
|
public long | getExecutionMaxTime()max time in ms taken by the excution of this query onto the DB
return executionMaxTime;
|
public long | getExecutionMinTime()min time in ms taken by the excution of this query onto the DB
return executionMinTime;
|
public long | getExecutionRowCount()Number of lines returned by all the executions of this query (from DB)
For now, {@link org.hibernate.Query#iterate()}
and {@link org.hibernate.Query#scroll()()} do not fill this statistic
return executionRowCount;
|
public java.lang.String | toString()
return new StringBuffer()
.append( "QueryStatistics" )
.append( "[cacheHitCount=" ).append( this.cacheHitCount )
.append( ",cacheMissCount=" ).append( this.cacheMissCount )
.append( ",cachePutCount=" ).append( this.cachePutCount )
.append( ",executionCount=" ).append( this.executionCount )
.append( ",executionRowCount=" ).append( this.executionRowCount )
.append( ",executionAvgTime=" ).append( this.executionAvgTime )
.append( ",executionMaxTime=" ).append( this.executionMaxTime )
.append( ",executionMinTime=" ).append( this.executionMinTime )
.append( ']" )
.toString();
|