org.javalite.activejdbc.statistics
Class QueryStats

java.lang.Object
  extended by org.javalite.activejdbc.statistics.QueryStats

public class QueryStats
extends Object

This class represents statistical information for one query.

Author:
Igor Polevoy

Constructor Summary
QueryStats(String query)
           
 
Method Summary
 void addQueryTime(long time)
          Whenever this query was executed, add execution time with this method.
 long getAvg()
           
 long getCount()
           
 long getMax()
           
 long getMin()
           
 String getQuery()
           
 long getTotal()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryStats

public QueryStats(String query)
Method Detail

addQueryTime

public void addQueryTime(long time)
Whenever this query was executed, add execution time with this method. This class will then recalculate all statistics.

Parameters:
time - time in milliseconds it took to execute the query

getAvg

public long getAvg()

getMin

public long getMin()

getMax

public long getMax()

getCount

public long getCount()

getTotal

public long getTotal()

getQuery

public String getQuery()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 JavaLite. All rights reserved.