[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3042) QueryStatistics performing more work than necessary to compute Avg Time

Steve Finch (JIRA) noreply at atlassian.com
Mon Dec 31 12:20:24 EST 2007


QueryStatistics performing more work than necessary to compute Avg Time
-----------------------------------------------------------------------

                 Key: HHH-3042
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3042
             Project: Hibernate3
          Issue Type: Improvement
    Affects Versions: 3.2.5
         Environment: Hibernate 3.2.5, any
            Reporter: Steve Finch
            Priority: Minor


In order to update the average time for a particular query, the current avg is being multiplied by the number of executions in order to retrieve the total execution time.  Beyond allowing errors to creep in (rounding will occur when total execution time is divided by the number of executions), this is also needless given the assumption that a query will be executed more often than the statistics are reviewed.  The average should be calculated only when it is time to display the value; instead, the executionAvgTime should be replaced by executionTotalTime.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list