Chapter 7. Metrics and Statistics

In this chapter, we will demonstrate how to produce statistical data points and collect metrics. Hibernate can be configured to start collecting and producing this data. Additionally, we will see how it can be collected through Java Management Extension (JMX). We will be covering the following topics in detail:

  • Statistical data types:
    • Session
    • Entity
    • Collection
    • Query
    • Cache
  • Statistics via JMX:
    • An introduction to JMX
  • Using JMX with Hibernate

Statistical data types

Hibernate collects various data points to help you measure the usage and performance of your application. This includes data collected about the session, entities, collections, query, and cache. Here, we discuss how to obtain this data and what each set of data points ...

Get Mastering Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.