To enable it, it needs to be switched on in the session factory e.g.:
- sessionFactory.getStatistics().setStatis
ticsEnabled(true);
- Statistics stats = HibernateUtil.getSessionFactory().getSta
tistics(); - stats.getSecondLevelCacheHitCount();
- Second Level Cache hit/miss counts.
- Entity load/fetch counts.
- Query Cache hit/miss counts.
- Query execution counts.
No comments:
Post a Comment