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 SessionProfiler
public void endOperationProfile(String operationName, DatabaseQuery query, int weight)
endOperationProfile
in interface SessionProfiler
protected 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 SessionProfiler
public void setSession(Session session)
SessionProfiler
setSession
in interface SessionProfiler
public void startOperationProfile(String operationName)
startOperationProfile
in interface SessionProfiler
public void startOperationProfile(String operationName, DatabaseQuery query, int weight)
startOperationProfile
in interface SessionProfiler
public void update(String operationName, Object value)
SessionProfiler
update
in interface SessionProfiler
public void occurred(String operationName, org.eclipse.persistence.internal.sessions.AbstractSession session)
SessionProfiler
occurred
in interface SessionProfiler
public void occurred(String operationName, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
SessionProfiler
occurred
in interface SessionProfiler
public void setProfileWeight(int profileWeight)
setProfileWeight
in interface SessionProfiler
SessionProfiler
public int getProfileWeight()
getProfileWeight
in interface SessionProfiler
SessionProfiler
public void initialize()
SessionProfiler
initialize
in interface SessionProfiler
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.