Hibernate Statistics

Hibernate Statistics

If you enable Hibernate statistics by setting the property hibernate.generate_statistics to true, Hibernate will expose a number of useful metrics. The page "Statistics" is used to expose these metrics. This page is only available in development mode.

Hibernate Configuration to enable the Statistics

<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
<hibernate-configuration>

    ...

    <property name="hibernate.generate_statistics">true</property>
    
  </session-factory>

</hibernate-configuration>