Class QueryStatisticsImpl

    • Constructor Detail

      • QueryStatisticsImpl

        public QueryStatisticsImpl​(String query)
    • Method Detail

      • getCacheHitCount

        public long getCacheHitCount()
        Queries retrieved successfully from the cache
        Specified by:
        getCacheHitCount in interface QueryStatistics
      • getExecutionRowCount

        public long getExecutionRowCount()
        Number of lines returned by all the executions of this query (from DB) For now, Query.stream()} and Query.scroll() do not fill this statistic
        Specified by:
        getExecutionRowCount in interface QueryStatistics
        Returns:
        The number of rows cumulatively returned by the given query; stream and scroll queries do not effect this total as their number of returned rows is not known at execution time.
      • getExecutionAvgTime

        public long getExecutionAvgTime()
        average time in ms taken by the execution of this query onto the DB
        Specified by:
        getExecutionAvgTime in interface QueryStatistics
      • getExecutionAvgTimeAsDouble

        public double getExecutionAvgTimeAsDouble()
        average time in ms as double taken by the execution of this query onto the DB
        Specified by:
        getExecutionAvgTimeAsDouble in interface QueryStatistics
      • getExecutionMaxTime

        public long getExecutionMaxTime()
        max time in ms taken by the execution of this query onto the DB
        Specified by:
        getExecutionMaxTime in interface QueryStatistics
      • getExecutionMinTime

        public long getExecutionMinTime()
        min time in ms taken by the execution of this query onto the DB
        Specified by:
        getExecutionMinTime in interface QueryStatistics
      • getExecutionTotalTime

        public long getExecutionTotalTime()
        total time in ms taken by the execution of this query onto the DB
        Specified by:
        getExecutionTotalTime in interface QueryStatistics
      • executed

        public void executed​(long rows,
                             long time)
        add statistics report of a DB query
        Parameters:
        rows - rows count returned
        time - time taken