Albert T. Wong
Albert T. Wong

Reputation: 1663

Can you get metrics and statistics from Hibernate OGM?

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?

Upvotes: 0

Views: 103

Answers (1)

Davide D'Alto
Davide D'Alto

Reputation: 8216

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

Upvotes: 1

Related Questions