|
Oracle Application Server DMS API Reference 10g Release 2 (10.1.2) B14002-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.dms.instrument.Sensor
oracle.dms.instrument.PhaseEvent
A PhaseEvent
is used to measure important intervals, phases, or blocks of code. Programs call the start()
method when the beginning of the interval and the stop()
method at the end of the interval. DMS then exports measurements of the duration of the interval, the number of times the event occurred, the minimum and maximum phase duration, and the number of threads currently executing between the start()
and stop()
markers. Depending on the derived metrics specified, a PhaseEvent sensor may contain time
, maximum
, minimum
, completed
, average
, active
, and maxActive
metrics.
Field Summary |
Fields inherited from class oracle.dms.instrument.Sensor |
active, all, average, completed, count, exclTime, maxActive, maximum, minimum, sum, time, value |
Method Summary | |
void |
abort(long token) Aborts the measurement of a phase. |
static PhaseEvent |
create(Noun parent, java.lang.String name, java.lang.String desc) Creates a new PhaseEvent. |
void |
deriveMetric(int metric) Instructs the PhaseEvent to derive additional metrics. |
long |
start() Signals the beginning of the phase. |
void |
start(long startToken) Signals the beginning of the phase. |
void |
stop(long token) Signals the end of the Phase. |
void |
stop(long startToken, long stopToken) Signals the end of the phase. |
long |
stop2(long token) Signals the end of the phase. |
Methods inherited from class oracle.dms.instrument.Sensor |
destroy, get, getDescription, getName, getValue, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static PhaseEvent create(Noun parent, java.lang.String name, java.lang.String desc)
parent
- the parent Nounname
- the name of the PhaseEventdesc
- the description of the PhaseEventpublic void deriveMetric(int metric)
deriveMetric
in class Sensor
metric
- bitmask of metric(s) to be derived.
Possible values are Sensor.minimum
, Sensor.maximum
, Sensor.completed
, Sensor.average
, Sensor.active
, Sensor.maxActive
and Sensor.all
(shorthand for all of the applicable derivations). The values can be bitwise-ORed together, or multiple calls to deriveMetric can be made.
public long start()
stop(long token)
stop(long token)
public void stop(long token)
start()
is put in a try block.
long token; PhaseEvent phase; try { token = phase.start(); // ... do something ... } finally { phase.stop(token); }
token
- the token obtained at the start of the phasepublic long stop2(long token)
token
- the token obtained at the start of the phasestop(long startToken, long stopToken)
start()
public void start(long startToken)
startToken
- the token signifying the beginning of the phase. Usually this token is obtained from a call to start()
start()
public void stop(long startToken, long stopToken)
startToken
- the token returned by the corresponding start()
callstopToken
- the token signifying the end of the phase that is obtained from a call to stop2(long token)
stop2(long token)
public void abort(long token)
long token; PhaseEvent phase; boolean stopped = false; try { token = phase.start(); // ... do something ... phase.stop(token); // placed at bottom of try block stopped = true; // placed at bottom of try block } finally { if (!stopped) phase.abort(token); }
token
- the token obtained at the start of the phase
|
Oracle Application Server DMS API Reference 10g Release 2 (10.1.2) B14002-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |