Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 2.04 KB

README.md

File metadata and controls

78 lines (60 loc) · 2.04 KB

Hikari JFR Maven Central Javadocs

A HikariCP MetricsTrackerFactory that generates JFR events.

Flight Recording of a JUnit Test

This project requires Java 11 based on OpenJDK or later and HikariCP 5+.

Usage

<dependency>
  <groupId>com.github.marschall</groupId>
  <artifactId>hikari-jfr</artifactId>
  <version>1.0.1</version>
</dependency>
HikariConfig hikariConfig = ...
hikariConfig.setMetricsTrackerFactory(new JfrMetricsTrackerFactory());

Caveats

The duration of the events is always 0, instead the duration is stored in an additonal column.

Events

The following events are supported

Connection Created
A physical connection was created. It has the following attributes
Pool Name
The name of the connection pool
Creation Time
The time it took to create a physical connection
Connection Acquired
A connection was acquired from the pool. It has the following attributes
Pool Name
The name of the connection pool
Acquisition Time
The time it took to acquire a connection from the pool
Connection Borrowed
A connection was borrowed from the pool. It has the following attributes
Pool Name
The name of the connection pool
Borrowed Time
The time the connection was borrowed from the pool
Connection Timeout
A could not be acquired in the request time from the pool. It has the following attributes
Pool Name
The name of the connection pool