public class DMSPerformanceProfiler extends Object implements Serializable, Cloneable, SessionProfiler
Description: A mechanism used to provide a link for EclipseLink performance profiling by using the DMS tool. The predefined EclipseLink metrics will be monitored by using DMS sensors. EclipseLink library instrumentation will be done by inserting DMS calls for the purpose of measuring its performance
Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected Map<String,oracle.dms.instrument.Noun> |
allWeightNouns |
protected Map<String,oracle.dms.instrument.Sensor> |
allWeightSensors |
static String |
CACHE |
static String |
CacheNounType |
static String |
CONNECT |
static String |
ConnectionInUse |
static String |
ConnectionNounType |
static String |
DistributedMergeDmsDisplayName |
static String |
EclipseLinkRootNoun |
protected Map<String,oracle.dms.instrument.Noun> |
heavyWeightNouns |
protected Map<String,oracle.dms.instrument.Sensor> |
heavyWeightSensors |
protected static boolean |
isDMSSpyInitialized |
static String |
MergeTime |
static String |
MiscellaneousNounType |
protected Map<String,oracle.dms.instrument.Sensor> |
normalAndHeavyWeightSensors |
protected Map<String,oracle.dms.instrument.Sensor> |
normalHeavyAndAllWeightSensors |
protected Map<String,oracle.dms.instrument.Noun> |
normalWeightNouns |
protected Map<String,oracle.dms.instrument.Sensor> |
normalWeightSensors |
protected ThreadLocal |
operationStartTokenThreadLocal |
static String |
RcmNounType |
protected oracle.dms.instrument.Noun |
root |
static String |
Sequencing |
protected org.eclipse.persistence.internal.sessions.AbstractSession |
session |
static String |
SessionNounType |
static String |
TransactionNounType |
static String |
UnitOfWorkRegister |
protected int |
weight |
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 |
---|
DMSPerformanceProfiler()
PUBLIC:
Create a new dms profiler.
|
DMSPerformanceProfiler(Session session)
PUBLIC:
Create a new dms profiler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createRootNoun()
INTERNAL:
Create root noun for TopLink dms metrics.
|
protected void |
destroyNounsByWeight(int weight)
INTERNAL:
Destroy nouns based on dms weight when user changes the weight at runtime.
|
protected void |
destroySensorsByWeight(int weight)
INTERNAL:
Destroy sensors based on dms weight when user changes the weight at runtime.
|
void |
endOperationProfile(String operationName)
INTERNAL:
Link to the dms PhaseEvent api stop().
|
void |
endOperationProfile(String operationName,
DatabaseQuery query,
int weight)
INTERNAL:
Link to the dms PhaseEvent api stop().
|
protected Map<String,oracle.dms.instrument.Noun> |
getAllWeightNouns() |
protected Map<String,oracle.dms.instrument.Sensor> |
getAllWeightSensors() |
protected Map<String,oracle.dms.instrument.Noun> |
getHeavyWeightNouns() |
protected Map<String,oracle.dms.instrument.Sensor> |
getHeavyWeightSensors() |
protected Map<String,oracle.dms.instrument.Sensor> |
getNormalAndHeavyWeightSensors() |
protected Map<String,oracle.dms.instrument.Sensor> |
getNormalHeavyAndAllWeightSensors() |
protected Map<String,oracle.dms.instrument.Noun> |
getNormalWeightNouns() |
protected Map<String,oracle.dms.instrument.Sensor> |
getNormalWeightSensors() |
protected oracle.dms.instrument.Noun |
getNounByType(String type,
oracle.dms.instrument.Noun parentNoun,
int weight)
INTERNAL:
Look for noun based on the given type and weight.
|
protected ThreadLocal |
getOperationStartTokenThreadLocal() |
protected oracle.dms.instrument.Sensor |
getPhaseEventForQuery(String operationName,
DatabaseQuery query,
int weight)
INTERNAL:
Look for sensor for the name: TopLink_<sessionName>_<domainClass>_<queryClass>_<queryName>(if exist)_<operationName>(if exist).
|
protected HashMap |
getPhaseEventStartToken() |
int |
getProfileWeight()
INTERNAL:
Return current TopLink dms weight.
|
protected oracle.dms.instrument.Sensor |
getSensorByName(String operationName)
INTERNAL:
Return dms sensor which created by pre-defined TopLink metrics.
|
org.eclipse.persistence.internal.sessions.AbstractSession |
getSession() |
String |
getSessionName() |
void |
initialize()
INTERNAL:
Initialize TopLink noun tree by default (DMSConsole.getSensorWeight())
|
protected void |
initializeAllWeightSensors()
INTERNAL:
Build dms ALL weight sensors for TopLink dms metrics.
|
protected void |
initializeHeavyWeightSensors()
INTERNAL:
Build dms HEAVY weight sensors for TopLink dms metrics.
|
protected void |
initializeNormalWeightSensors()
INTERNAL:
Build dms NORMAL weight sensors for TopLink dms metrics.
|
protected void |
initializeNounTree(int newWeight)
INTERNAL:
Initialize TopLink noun tree based on dms weight.
|
protected void |
initSpy()
INTERNAL:
This method is useful for standalone TopLink application
Initialize DMS, should be called once and should be called before any other DMS calls.
|
void |
occurred(String operationName,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Link to the dms Event api occurred().
|
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:
Finish a profile operation if profiling.
|
void |
setProfileWeight(int newWeight)
INTERNAL:
Api for changing dms weight dynamically.
|
void |
setSession(Session session)
INTERNAL:
Set the session.
|
void |
startOperationProfile(String operationName)
INTERNAL:
Link to the dms PhaseEvent api start().
|
void |
startOperationProfile(String operationName,
DatabaseQuery query,
int weight)
INTERNAL:
Link to the dms PhaseEvent api start().
|
void |
update(String operationName,
Object value)
INTERNAL:
Link to the dms State api update().
|
public static final String EclipseLinkRootNoun
public static final String SessionNounType
public static final String TransactionNounType
public static final String RcmNounType
public static final String ConnectionNounType
public static final String CacheNounType
public static final String MiscellaneousNounType
public static final String ConnectionInUse
public static final String MergeTime
public static final String UnitOfWorkRegister
public static final String DistributedMergeDmsDisplayName
public static final String Sequencing
public static final String CONNECT
public static final String CACHE
protected org.eclipse.persistence.internal.sessions.AbstractSession session
protected oracle.dms.instrument.Noun root
protected Map<String,oracle.dms.instrument.Sensor> normalAndHeavyWeightSensors
protected Map<String,oracle.dms.instrument.Sensor> normalHeavyAndAllWeightSensors
protected ThreadLocal operationStartTokenThreadLocal
protected static boolean isDMSSpyInitialized
protected int weight
public DMSPerformanceProfiler()
public DMSPerformanceProfiler(Session session)
protected void initializeNounTree(int newWeight)
public void setProfileWeight(int newWeight)
setProfileWeight
in interface SessionProfiler
public void initialize()
initialize
in interface SessionProfiler
public int getProfileWeight()
getProfileWeight
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 endOperationProfile(String operationName)
endOperationProfile
in interface SessionProfiler
public void endOperationProfile(String operationName, DatabaseQuery query, int weight)
endOperationProfile
in interface SessionProfiler
public void update(String operationName, Object value)
update
in interface SessionProfiler
public void occurred(String operationName, org.eclipse.persistence.internal.sessions.AbstractSession session)
occurred
in interface SessionProfiler
public void occurred(String operationName, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractSession session)
occurred
in interface SessionProfiler
protected oracle.dms.instrument.Sensor getPhaseEventForQuery(String operationName, DatabaseQuery query, int weight)
protected oracle.dms.instrument.Noun getNounByType(String type, oracle.dms.instrument.Noun parentNoun, int weight)
protected oracle.dms.instrument.Sensor getSensorByName(String operationName)
protected void createRootNoun()
protected void initializeNormalWeightSensors()
protected void initializeHeavyWeightSensors()
protected void initializeAllWeightSensors()
protected void initSpy()
protected void destroySensorsByWeight(int weight)
protected void destroyNounsByWeight(int weight)
protected HashMap getPhaseEventStartToken()
protected Map<String,oracle.dms.instrument.Sensor> getNormalAndHeavyWeightSensors()
protected Map<String,oracle.dms.instrument.Sensor> getNormalHeavyAndAllWeightSensors()
protected ThreadLocal getOperationStartTokenThreadLocal()
public org.eclipse.persistence.internal.sessions.AbstractSession getSession()
public String getSessionName()
public void setSession(Session session)
SessionProfiler
setSession
in interface SessionProfiler
public Object profileExecutionOfQuery(DatabaseQuery query, Record row, org.eclipse.persistence.internal.sessions.AbstractSession session)
SessionProfiler
profileExecutionOfQuery
in interface SessionProfiler
Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.