views:

44

answers:

0

We are heavy users of the Hibernate Statistics in our application, but recently came to realize that Statistics.getQueries() does not return any Criteria queries. I realize that the method returns the HQL strings, but it also means that the Statistics are incomplete. I found a few older issues talking about this, but no resolution.

http://opensource.atlassian.com/projects/hibernate/browse/HHH-634

Also HHH-3452 talks about this as well.

The strange thing is that the count methods like Statistics.getQueryExecutionCount() return the TOTAL number of queries including the Critieria ones. However Statistics.getQueries ignores the Criteria. Frustrating.

Has anyone else figured out a way to track execution statistics for Criteria queries?