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 Details

    • QueryStats

      public QueryStats(String query)
  • Method Details

    • 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