Class PerformanceProfiler

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, SessionProfiler

    public class PerformanceProfiler
    extends SessionProfilerAdapter
    implements java.io.Serializable, java.lang.Cloneable

    Purpose: A tool used to provide high level performance profiling information.

    Since:
    TopLink 1.0
    Author:
    James Sutherland
    See Also:
    Serialized Form
    • Constructor Detail

      • PerformanceProfiler

        public PerformanceProfiler()
        PUBLIC: Create a new profiler. The profiler can be registered with a session to log performance information on queries.
      • PerformanceProfiler

        public PerformanceProfiler​(Session session)
        Deprecated.
        replaced by PerformanceProfiler()
        OBSOLETE: Create a new profiler. The profiler can be registered with a session to log performance information on queries.
      • PerformanceProfiler

        public PerformanceProfiler​(Session session,
                                   boolean shouldLogProfile)
        Deprecated.
        replaced by PerformanceProfiler()
        OBSOLETE: Create a new profiler. The profiler can be registered with a session to log performance information on queries.
      • PerformanceProfiler

        public PerformanceProfiler​(boolean shouldLogProfile)
        PUBLIC: Create a new profiler. The profiler can be registered with a session to log performance information on queries.
    • Method Detail

      • buildProfileSummary

        public Profile buildProfileSummary()
        INTERNAL: Return a summary profile reporting on the profiles contained.
      • buildProfileSummaryByClass

        public java.util.Hashtable buildProfileSummaryByClass()
        INTERNAL: Return a map of summary profiles reporting on the profile contained.
      • buildProfileSummaryByQuery

        public java.util.Hashtable buildProfileSummaryByQuery()
        INTERNAL: Return a map of summary profiles reporting on the profile contained.
      • dontLogProfile

        public void dontLogProfile()
        PUBLIC: Set whether after each query execution the profile result should be logged. By default this is false.
      • getProfiles

        public java.util.List<Profile> getProfiles()
        Return the profiles logged in this profiler.
      • getSession

        public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
      • logProfile

        public void logProfile()
        PUBLIC: Set whether after each query execution the profile result should be logged. By default this is true.
      • logProfileSummary

        public void logProfileSummary()
        PUBLIC: Log a profile summary.
      • logProfileSummaryByClass

        public void logProfileSummaryByClass()
        PUBLIC: Log a profile summary by class.
      • logProfileSummaryByQuery

        public void logProfileSummaryByQuery()
        PUBLIC: Log a profile summary by query.
      • profileExecutionOfQuery

        public java.lang.Object profileExecutionOfQuery​(DatabaseQuery query,
                                                        Record row,
                                                        org.eclipse.persistence.internal.sessions.AbstractSession session)
        INTERNAL: Finish a profile operation if profiling. This assumes the start operation proceeds on the stack. The session must be passed to allow units of work etc. to share their parents profiler.
        Specified by:
        profileExecutionOfQuery in interface SessionProfiler
        Overrides:
        profileExecutionOfQuery in class SessionProfilerAdapter
        Returns:
        the execution result of the query.
      • setShouldLogProfile

        public void setShouldLogProfile​(boolean shouldLogProfile)
        PUBLIC: Set whether after each query execution the profile result should be logged. By default this is true.
      • shouldLogProfile

        public boolean shouldLogProfile()