Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Fetching Statistics

Open JPA Fetch Statistics Tool monitors persistent field access and determines which fields are never used. This tool
can be used to help tune an application.

Note: Open JPA Fetching Statistics Tool works with the runtime enhancement.

Usage instructions:

Download

The latest OpenJPA Tools JAR file can be download from the SNAPSHOT Repository or can be built from the source code in svn by using Maven 2.2.1 and Java SE 6.

Usage

This description assumes your application is running the on same machine as JConsole and application JVM matches the JConsole JVM.

...

  1. Configuration
    Append the path of openjpa-fetch-statistics-version-SNAPSHOT.jar file to the classpath prior to lanuching the JVM.

...

  1. Statistics Collecting and Monitoring
    When this tool is configured, it will be active for all persistence units in the JVM. Statistics will be dumped via the
    openjpa.Runtime channel with the INFO level every 10 minutes, or when the JVM terminates. Any EAGER field that is logged
    has not been accessed by an application.

...

  1. Configuration removal
    Stop the JVM.
    Remove openjpa-fetch-statistics-version-SNAPSHOT.jar from the classpath.
  2. Wiki Markup
    If all goes well, at this point you should see a tab labeled DataCache-\[pu_name\]-\[n\]
      !screen.jpg|thumbnail,border=1!

Performance Consideration

There will be a large performance impact when running this tooling. It is not supported, nor recommended for production
use. This tool should not be used on a production machine.