Class QueryStats
- java.lang.Object
-
- org.javalite.activejdbc.statistics.QueryStats
-
public class QueryStats extends Object
This class represents statistical information for one query.- Author:
- Igor Polevoy
-
-
Constructor Summary
Constructors Constructor Description QueryStats(String query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddQueryTime(long time)Whenever this query was executed, add execution time with this method.longgetAvg()longgetCount()longgetMax()longgetMin()StringgetQuery()longgetTotal()StringtoString()
-
-
-
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()
-
-