Class PerformanceMonitor

    • Field Detail

      • session

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

        protected long lastDumpTime
      • dumpTime

        protected long dumpTime
      • profileWeight

        protected int profileWeight
    • Constructor Detail

      • PerformanceMonitor

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

      • getDumpTime

        public long getDumpTime()
        Return the number of milliseconds after which the monitor results should be logged.
      • setDumpTime

        public void setDumpTime​(long dumpTime)
        Set the number of milliseconds after which the monitor results should be logged.
      • checkDumpTime

        public void checkDumpTime()
        Log the results after a set amount of time has passed.
      • dumpResults

        public void dumpResults()
        Log the results to the session's log (System.out).
      • getOperationStartTimes

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

        public Object getOperationTime​(String operation)
      • getSession

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

        public Object profileExecutionOfQuery​(DatabaseQuery query,
                                              Record row,
                                              org.eclipse.persistence.internal.sessions.AbstractSession session)
        INTERNAL: Monitoring is done on the endOperation only.
        Specified by:
        profileExecutionOfQuery in interface SessionProfiler
        Returns:
        the execution result of the query.
      • occurred

        public void occurred​(String operationName,
                             org.eclipse.persistence.internal.sessions.AbstractSession session)
        Description copied from interface: SessionProfiler
        INTERNAL: Increase DMS Event sensor occurrence.(DMS)
        Specified by:
        occurred in interface SessionProfiler
      • occurred

        public void occurred​(String operationName,
                             DatabaseQuery query,
                             org.eclipse.persistence.internal.sessions.AbstractSession session)
        Description copied from interface: SessionProfiler
        INTERNAL: Increase DMS Event sensor occurrence.(DMS)
        Specified by:
        occurred in interface SessionProfiler
      • setProfileWeight

        public void setProfileWeight​(int profileWeight)
        Set the level of profiling. One of ALL, HEAVY, NORMAL, NONE. The higher the level, the more operations are profiled.
        Specified by:
        setProfileWeight in interface SessionProfiler
        See Also:
        SessionProfiler