|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.rmi.server.perf.Topic
public class Topic
An instance of this class is used to calculate the duration of an arbitrary operation. Durations are averaged over time.
Usage:
for(int i = 0; i < 1000;`i++){
Topic t = ....
t.start();
// do something
t.end();
}
System.out.println(t.duration());
PerfAnalyzer| Constructor Summary | |
|---|---|
Topic(java.lang.String name)
Constructor for Topic. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object other)
|
double |
duration()
|
void |
end()
Calculates the current duration corresponding to this instance, based on its internal start time and system time. |
java.lang.String |
getName()
|
boolean |
isEnabled()
|
void |
setEnabled(boolean enabled)
|
void |
start()
Internally sets the start time of this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Topic(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
public void start()
public void end()
start()public double duration()
public void setEnabled(boolean enabled)
enabled - if true, turns this instance's
sampling mode to "on".public boolean isEnabled()
true if stat calculation is performed by this
instance.public int compareTo(java.lang.Object other)
compareTo in interface java.lang.ComparableComparable.compareTo(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||