Class PerformanceProfiler
- java.lang.Object
-
- org.eclipse.persistence.sessions.SessionProfilerAdapter
-
- org.eclipse.persistence.tools.profiler.PerformanceProfiler
-
- All Implemented Interfaces:
Serializable
,Cloneable
,SessionProfiler
public class PerformanceProfiler extends SessionProfilerAdapter implements Serializable, Cloneable
Purpose: A tool used to provide high level performance profiling information.
- Since:
- TopLink 1.0
- Author:
- James Sutherland
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.eclipse.persistence.sessions.SessionProfiler
ALL, AssignSequence, CacheCoordination, CacheCoordinationSerialize, CacheHits, CacheMisses, CacheSize, Caching, ChangeSetsNotProcessed, ChangeSetsProcessed, ClientSessionCreated, ClientSessionReleased, ConnectionManagement, ConnectionPing, Connects, DescriptorEvent, Disconnects, DistributedMerge, HEAVY, JtsAfterCompletion, JtsBeforeCompletion, Logging, LoginTime, Merge, NONE, NORMAL, ObjectBuilding, OptimisticLockException, QueryPreparation, RcmReceived, RcmSent, RcmStatus, Register, Remote, RemoteChangeSet, RemoteLazy, RemoteMetadata, RowFetch, SessionEvent, SessionName, SqlGeneration, SqlPrepare, StatementExecute, Transaction, UowCommit, UowCommits, UowCreated, UowReleased, UowRollbacks
-
-
Constructor Summary
Constructors Constructor Description PerformanceProfiler()
PUBLIC: Create a new profiler.PerformanceProfiler(boolean shouldLogProfile)
PUBLIC: Create a new profiler.PerformanceProfiler(Session session)
Deprecated.replaced by PerformanceProfiler()PerformanceProfiler(Session session, boolean shouldLogProfile)
Deprecated.replaced by PerformanceProfiler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Profile
buildProfileSummary()
INTERNAL: Return a summary profile reporting on the profiles contained.Hashtable
buildProfileSummaryByClass()
INTERNAL: Return a map of summary profiles reporting on the profile contained.Hashtable
buildProfileSummaryByQuery()
INTERNAL: Return a map of summary profiles reporting on the profile contained.PerformanceProfiler
clone()
void
dontLogProfile()
PUBLIC: Set whether after each query execution the profile result should be logged.void
endOperationProfile(String operationName)
INTERNAL: End the operation timing.void
endOperationProfile(String operationName, DatabaseQuery query, int weight)
INTERNAL: End the operation timing.List<Profile>
getProfiles()
Return the profiles logged in this profiler.int
getProfileWeight()
INTERNAL: Return DMS sensor weight(DMS)org.eclipse.persistence.internal.sessions.AbstractSession
getSession()
void
initialize()
INTERNAL: Initialize EclipseLink noun tree(DMS)void
logProfile()
PUBLIC: Set whether after each query execution the profile result should be logged.void
logProfileSummary()
PUBLIC: Log a profile summary.void
logProfileSummaryByClass()
PUBLIC: Log a profile summary by class.void
logProfileSummaryByQuery()
PUBLIC: Log a profile summary by query.Object
profileExecutionOfQuery(DatabaseQuery query, Record row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Finish a profile operation if profiling.void
setSession(Session session)
INTERNAL: Set the session.void
setShouldLogProfile(boolean shouldLogProfile)
PUBLIC: Set whether after each query execution the profile result should be logged.boolean
shouldLogProfile()
void
startOperationProfile(String operationName)
INTERNAL: Start the operation timing.void
startOperationProfile(String operationName, DatabaseQuery query, int weight)
INTERNAL: Start the operation timing.-
Methods inherited from class org.eclipse.persistence.sessions.SessionProfilerAdapter
occurred, occurred, setProfileWeight, update
-
-
-
-
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 Hashtable buildProfileSummaryByClass()
INTERNAL: Return a map of summary profiles reporting on the profile contained.
-
buildProfileSummaryByQuery
public Hashtable buildProfileSummaryByQuery()
INTERNAL: Return a map of summary profiles reporting on the profile contained.
-
clone
public PerformanceProfiler clone()
-
dontLogProfile
public void dontLogProfile()
PUBLIC: Set whether after each query execution the profile result should be logged. By default this is false.
-
endOperationProfile
public void endOperationProfile(String operationName)
INTERNAL: End the operation timing.- Specified by:
endOperationProfile
in interfaceSessionProfiler
- Overrides:
endOperationProfile
in classSessionProfilerAdapter
-
endOperationProfile
public void endOperationProfile(String operationName, DatabaseQuery query, int weight)
INTERNAL: End the operation timing.- Specified by:
endOperationProfile
in interfaceSessionProfiler
- Overrides:
endOperationProfile
in classSessionProfilerAdapter
-
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 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 interfaceSessionProfiler
- Overrides:
profileExecutionOfQuery
in classSessionProfilerAdapter
- Returns:
- the execution result of the query.
-
setSession
public void setSession(Session session)
Description copied from class:SessionProfilerAdapter
INTERNAL: Set the session.- Specified by:
setSession
in interfaceSessionProfiler
- Overrides:
setSession
in classSessionProfilerAdapter
-
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()
-
startOperationProfile
public void startOperationProfile(String operationName)
INTERNAL: Start the operation timing.- Specified by:
startOperationProfile
in interfaceSessionProfiler
- Overrides:
startOperationProfile
in classSessionProfilerAdapter
-
startOperationProfile
public void startOperationProfile(String operationName, DatabaseQuery query, int weight)
INTERNAL: Start the operation timing.- Specified by:
startOperationProfile
in interfaceSessionProfiler
- Overrides:
startOperationProfile
in classSessionProfilerAdapter
-
getProfileWeight
public int getProfileWeight()
Description copied from class:SessionProfilerAdapter
INTERNAL: Return DMS sensor weight(DMS)- Specified by:
getProfileWeight
in interfaceSessionProfiler
- Overrides:
getProfileWeight
in classSessionProfilerAdapter
-
initialize
public void initialize()
Description copied from class:SessionProfilerAdapter
INTERNAL: Initialize EclipseLink noun tree(DMS)- Specified by:
initialize
in interfaceSessionProfiler
- Overrides:
initialize
in classSessionProfilerAdapter
-
-