public class PerformanceProfiler extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, SessionProfiler
Purpose: A tool used to provide high level performance profiling information.
ALL, AssignSequence, CachedObjects, CacheHits, CacheMisses, Caching, ChangeSetsNotProcessed, ChangeSetsProcessed, ClientSessionCreated, ConnectionManagement, ConnectionPing, Connects, DescriptorEvent, Disconnects, DistributedMerge, HEAVY, JtsAfterCompletion, JtsBeforeCompletion, Logging, LoginTime, Merge, NONE, NORMAL, ObjectBuilding, OptimisticLockException, QueryPreparation, RcmReceived, RcmSent, RcmStatus, Register, RemoteChangeSet, RowFetch, SessionEvent, SessionName, SqlGeneration, SqlPrepare, StatementExecute, Transaction, UowCommit, UowCommits, UowCreated, UowRollbacks
Constructor and 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()
|
Modifier and Type | Method and Description |
---|---|
Profile |
buildProfileSummary()
INTERNAL: Return a summary profile reporting on the profiles contained.
|
java.util.Hashtable |
buildProfileSummaryByClass()
INTERNAL: Return a map of summary profiles reporting on the profile contained.
|
java.util.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(java.lang.String operationName)
INTERNAL: End the operation timing.
|
void |
endOperationProfile(java.lang.String operationName, DatabaseQuery query, int weight)
INTERNAL: End the operation timing.
|
java.util.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.
|
void |
occurred(java.lang.String operationName)
INTERNAL: Increase DMS Event sensor occurrence.
|
void |
occurred(java.lang.String operationName, DatabaseQuery query)
INTERNAL: Increase DMS Event sensor occurrence.
|
java.lang.Object |
profileExecutionOfQuery(DatabaseQuery query, Record row, org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Finish a profile operation if profiling.
|
void |
setProfileWeight(int weight)
INTERNAL: Set DMS sensor weight(DMS)
|
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(java.lang.String operationName)
INTERNAL: Start the operation timing.
|
void |
startOperationProfile(java.lang.String operationName, DatabaseQuery query, int weight)
INTERNAL: Start the operation timing.
|
void |
update(java.lang.String operationName, java.lang.Object value)
INTERNAL: Update the value of the State sensor.
|
public PerformanceProfiler()
public PerformanceProfiler(Session session)
public PerformanceProfiler(Session session, boolean shouldLogProfile)
public PerformanceProfiler(boolean shouldLogProfile)
public Profile buildProfileSummary()
public java.util.Hashtable buildProfileSummaryByClass()
public java.util.Hashtable buildProfileSummaryByQuery()
public PerformanceProfiler clone()
clone
in class java.lang.Object
public void dontLogProfile()
public void endOperationProfile(java.lang.String operationName)
endOperationProfile
in interface SessionProfiler
public void endOperationProfile(java.lang.String operationName, DatabaseQuery query, int weight)
endOperationProfile
in interface SessionProfiler
public java.util.List<Profile> getProfiles()
public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
public void logProfile()
public void logProfileSummary()
public void logProfileSummaryByClass()
public void logProfileSummaryByQuery()
public java.lang.Object profileExecutionOfQuery(DatabaseQuery query, Record row, org.eclipse.persistence.internal.sessions.AbstractSession session)
profileExecutionOfQuery
in interface SessionProfiler
public void setSession(Session session)
SessionProfiler
setSession
in interface SessionProfiler
public void setShouldLogProfile(boolean shouldLogProfile)
public boolean shouldLogProfile()
public void startOperationProfile(java.lang.String operationName)
startOperationProfile
in interface SessionProfiler
public void startOperationProfile(java.lang.String operationName, DatabaseQuery query, int weight)
startOperationProfile
in interface SessionProfiler
public void update(java.lang.String operationName, java.lang.Object value)
SessionProfiler
update
in interface SessionProfiler
public void occurred(java.lang.String operationName)
SessionProfiler
occurred
in interface SessionProfiler
public void occurred(java.lang.String operationName, DatabaseQuery query)
SessionProfiler
occurred
in interface SessionProfiler
public void setProfileWeight(int weight)
SessionProfiler
setProfileWeight
in interface SessionProfiler
public int getProfileWeight()
SessionProfiler
getProfileWeight
in interface SessionProfiler
public void initialize()
SessionProfiler
initialize
in interface SessionProfiler