0

I'm trying to get performance data from Hibernate OGM. It doesn't seem to have the Hibernate statistics classes like Hibernate ORM. Is there something equivalent?

v.ladynev
  • 19,275
  • 8
  • 46
  • 67
Albert T. Wong
  • 1,535
  • 1
  • 13
  • 21

1 Answers1

1

The reason there are not specific classes is that you should be able to use the existing one in ORM.

For example:

org.hibernate.stat.Statistics statistics = getSessionFactory().getStatistics();
statistics.setStatisticsEnabled( true );
final Session session = openSession();
...
statistics.logSummary();
session.close();

If you think that something is missing or not working, you can signal it on the Hibernate OGM Jira or forum.

Davide

Davide D'Alto
  • 7,421
  • 2
  • 16
  • 30