Last active
January 9, 2017 03:49
-
-
Save thjanssen/05c334cb48b7f0f56df155ab4e75821a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Statistics stats = sessionFactory.getStatistics(); | |
long queryCount = stats.getQueryExecutionCount(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<persistence> | |
<persistence-unit name=”my-persistence-unit”> | |
<description>Hibernate Tips</description> | |
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> | |
<properties> | |
<property name=”hibernate.generate_statistics” value=”true” /> | |
… | |
</properties> | |
</persistence-unit> | |
</persistence> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16:24:55,318 INFO [org.hibernate.engine.internal.StatisticalLoggingSessionEventListener] – Session Metrics { | |
25659 nanoseconds spent acquiring 1 JDBC connections; | |
22394 nanoseconds spent releasing 1 JDBC connections; | |
1091216 nanoseconds spent preparing 12 JDBC statements; | |
11118842 nanoseconds spent executing 12 JDBC statements; | |
0 nanoseconds spent executing 0 JDBC batches; | |
0 nanoseconds spent performing 0 L2C puts; | |
0 nanoseconds spent performing 0 L2C hits; | |
0 nanoseconds spent performing 0 L2C misses; | |
16999942 nanoseconds spent executing 1 flushes (flushing a total of 17 entities and 17 collections); | |
63915 nanoseconds spent executing 1 partial-flushes (flushing a total of 0 entities and 0 collections) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment