Module eclipselink

Class PerformanceProfiler

    • Field Detail

      • session

        protected transient org.eclipse.persistence.internal.sessions.AbstractSession session
      • shouldLogProfile

        protected boolean shouldLogProfile
      • nestLevel

        protected int nestLevel
      • nestTime

        protected long nestTime
      • profileTime

        protected long profileTime
    • 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​(boolean shouldLogProfile)
        PUBLIC: Create a new profiler. The profiler can be registered with a session to log performance information on queries.
    • Method Detail

      • addProfile

        protected void addProfile​(Profile profile)
      • buildProfileSummary

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

        public Hashtable<Class<?>,​Profile> buildProfileSummaryByClass()
        INTERNAL: Return a map of summary profiles reporting on the profile contained.
      • buildProfileSummaryByQuery

        public Hashtable<Class<?>,​Profile> 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.
      • getNestLevel

        protected int getNestLevel()
      • getNestTime

        protected long getNestTime()
      • getOperationStartTimes

        protected Map<String,​Long> getOperationStartTimes()
      • getOperationTimings

        protected Map<String,​Long> getOperationTimings()
      • getProfiles

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

        protected long getProfileTime()
      • 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.
      • setNestLevel

        protected void setNestLevel​(int nestLevel)
      • setNestTime

        protected void setNestTime​(long nestTime)
      • setOperationStartTimes

        protected void setOperationStartTimes​(Map<String,​Long> operationStartTimes)
      • setOperationStartTimesByThread

        protected void setOperationStartTimesByThread​(Map<Integer,​Map<String,​Long>> operationStartTimesByThread)
      • setOperationTimings

        protected void setOperationTimings​(Map<String,​Long> operationTimings)
      • setOperationTimingsByThread

        protected void setOperationTimingsByThread​(Map<Integer,​Map<String,​Long>> operationTimingsByThread)
      • setProfiles

        protected void setProfiles​(Vector<Profile> profiles)
      • setProfileTime

        protected void setProfileTime​(long profileTime)
      • 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()
      • writeNestingTabs

        protected void writeNestingTabs​(Writer writer)