Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/Examples/JPA/Monitoring"
(New page: Monitoring EclipseLink supports a profiling and monitoring API through its [http://www.eclipse.org/eclipselink/api/2.2/org/eclipse/persistence/session...) |
|||
Line 15: | Line 15: | ||
==Monitoring Levels== | ==Monitoring Levels== | ||
− | + | The profile weight can be configured for the PerformanceMonitor through the API. The default weight if the PerformanceMonitor is set is <code>ALL</code>. | |
+ | 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. | ||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
Line 21: | Line 23: | ||
! Level !! Description | ! 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. |
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Revision as of 12:45, 26 January 2011
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. |