public class PerformanceMonitor extends Object implements Serializable, Cloneable, SessionProfiler
Purpose: A tool used to provide performance monitoring information in a server environment.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COUNTER |
protected long |
dumpTime |
protected long |
lastDumpTime |
protected Map<Integer,Map<String,Long>> |
operationStartTimesByThread |
protected Map<String,Object> |
operationTimings |
protected int |
profileWeight |
protected org.eclipse.persistence.internal.sessions.AbstractSession |
session |
protected static String |
TIMER |
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 and Description |
|---|
PerformanceMonitor()
PUBLIC:
Create a new profiler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkDumpTime()
Log the results after a set amount of time has passed.
|
PerformanceMonitor |
clone() |
void |
dumpResults()
Log the results to the session's log (System.out).
|
void |
endOperationProfile(String operationName)
INTERNAL:
End the operation timing.
|
void |
endOperationProfile(String operationName,
DatabaseQuery query,
int weight)
INTERNAL:
End the operation timing.
|
long |
getDumpTime()
Return the number of milliseconds after which the monitor results should be logged.
|
protected Map<String,Long> |
getOperationStartTimes() |
protected Map<Integer,Map<String,Long>> |
getOperationStartTimesByThread() |
Object |
getOperationTime(String operation) |
Map<String,Object> |
getOperationTimings() |
int |
getProfileWeight()
Return the level of profiling.
|
org.eclipse.persistence.internal.sessions.AbstractSession |
getSession() |
void |
initialize()
INTERNAL:
Initialize EclipseLink noun tree(DMS)
|
void |
occurred(String operationName,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Increase DMS Event sensor occurrence.(DMS)
|
void |
occurred(String operationName,
DatabaseQuery query,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Increase DMS Event sensor occurrence.(DMS)
|
Object |
profileExecutionOfQuery(DatabaseQuery query,
Record row,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Monitoring is done on the endOperation only.
|
void |
setDumpTime(long dumpTime)
Set the number of milliseconds after which the monitor results should be logged.
|
void |
setProfileWeight(int profileWeight)
Set the level of profiling.
|
void |
setSession(Session session)
INTERNAL:
Set the session.
|
void |
startOperationProfile(String operationName)
INTERNAL:
Start the operation timing.
|
void |
startOperationProfile(String operationName,
DatabaseQuery query,
int weight)
INTERNAL:
Start the operation timing.
|
void |
update(String operationName,
Object value)
INTERNAL:
Update the value of the State sensor.(DMS)
|
protected static final String COUNTER
protected static final String TIMER
protected transient org.eclipse.persistence.internal.sessions.AbstractSession session
protected long lastDumpTime
protected long dumpTime
protected int profileWeight
public PerformanceMonitor()
public long getDumpTime()
public void setDumpTime(long dumpTime)
public PerformanceMonitor clone()
public void checkDumpTime()
public void dumpResults()
public void endOperationProfile(String operationName)
endOperationProfile in interface SessionProfilerpublic void endOperationProfile(String operationName, DatabaseQuery query, int weight)
endOperationProfile in interface SessionProfilerprotected Map<Integer,Map<String,Long>> getOperationStartTimesByThread()
public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
public Object profileExecutionOfQuery(DatabaseQuery query, Record row, org.eclipse.persistence.internal.sessions.AbstractSession session)
profileExecutionOfQuery in interface SessionProfilerpublic void setSession(Session session)
SessionProfilersetSession in interface SessionProfilerpublic void startOperationProfile(String operationName)
startOperationProfile in interface SessionProfilerpublic void startOperationProfile(String operationName, DatabaseQuery query, int weight)
startOperationProfile in interface SessionProfilerpublic void update(String operationName, Object value)
SessionProfilerupdate in interface SessionProfilerpublic void occurred(String operationName, org.eclipse.persistence.internal.sessions.AbstractSession session)
SessionProfileroccurred in interface SessionProfilerpublic void occurred(String operationName, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
SessionProfileroccurred in interface SessionProfilerpublic void setProfileWeight(int profileWeight)
setProfileWeight in interface SessionProfilerSessionProfilerpublic int getProfileWeight()
getProfileWeight in interface SessionProfilerSessionProfilerpublic void initialize()
SessionProfilerinitialize in interface SessionProfilerCopyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.