Jump to: navigation, search


EclipseLink supports a profiling and monitoring API through its SessionProfiler interface. This interface gives events that allows a profiler or monitoring service to record performance or metrics on the EclipseLink application.

As of EclipseLink 2.2 a PerformanceMonitor is provided to collect performance an metric information. When enabled the PerformanceMonitor will log the monitoring information at set intervals, allowing an application's performance to be analyzed.

Previous to EclipseLink 2.2, a PerformanceProfiler was provided, but it did not make use of the complete SessionProfiler API, and was only useful for profiling a single use case, not a multi-user server. A QueryMonitor was also provided that provided simple monitoring information on queries, but no detailed information.

The PerformanceMonitor is enabled through the "eclipselink.profiler" persistence unit property in the persistence.xml file.

Persistence unit property

<property name="eclipselink.profiler" value="PerformanceMonitor"/>

Monitoring Levels

The profile weight can be configured for the PerformanceMonitor through the API. The default weight if the PerformanceMonitor is set is ALL. By default no profiler is set for a persistence unit, so no profiling or monitoring is done. The higher the level of monitoring the larger the performance overhead of the monitor.

Level Description
NONE No monitoring is done.
NORMAL Metrics are tracked, but profiling is not done.
HEAVY Metrics and profiling times are tracked.
ALL Metrics and profiling times are tracked.