Loading
Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
Contents
 Search
Other Searches
 PDF
PDF
Comments
Comments


profiler

Use eclipselink.profiler to specify which performance profiler to use in order to capture runtime statistics.


Values

Table 5-83 describes this persistence property's values.

Table 5-83 Valid Values for profiler

Value Description

NoProfiler

Do not use a performance profiler.

PerformanceProfiler

Use EclipseLink performance profiler (org.eclipse.persistence.tools.profiler.PerformanceProfiler class).

QueryMonitor

Monitor query executions and cache hits (org.eclipse.persistence.tools.profiler.QueryMonitor class).

This option provides a simple low-overhead means for measuring performance of query executions and cache hits. You may want to use this option for performance analysis in a complex system.

Custom profiler

Specify a custom profiler class name which implements SessionProfiler and provides a no-argument constructor.



Usage


Examples

Example 5-81 shows how to use this property in the persistence.xml file.

Example 5-81 Using profiler in persistence.xml

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

Example 5-82 shows how to use this property in a property map.

Example 5-82 Using profiler in Property Map

import org.eclipse.persistence.config.ProfilerType;import org.eclipse.persistence.config.PersistenceUnitProperties;
propertiesMap.put(PersistenceUnitProperties.PROFILER, ProfilerType.PerformanceProfiler);


See Also

For more information, see:

Comments powered by Disqus