|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.rmi.server.perf.PerfAnalyzer
public class PerfAnalyzer
This class is used to collect performance data (in fact, average durations) about
arbitrary operations - internally kept in the for of Topics.
Usage:
public class MyOperation{
Topic t = PerfAnalyzer.getInstance().getTopic("MyOperation.Duration");
public void doSomething(){
if(t.isEnabled()){
t.start();
}
// do something
if(t.isEnabled()){
t.end();
}
}
}
| Method Summary | |
|---|---|
MBeanContainer |
createMBean()
Internally creates a MBean and its ObjectName, that are
returned in a MBeanContainer. |
void |
disable()
Disables average duration calculation. |
void |
enable()
Enables average duration calculation. |
static PerfAnalyzer |
getInstance()
|
Topic |
getTopic(java.lang.String name)
|
java.util.Collection |
getTopics()
|
boolean |
isEnabled()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean isEnabled()
true if average duration calculation is turned on.public void enable()
public void disable()
public Topic getTopic(java.lang.String name)
name - the name of the topic to return.
Topic with the given name - a new topic is created with
the given name if it does not already exist.public java.util.Collection getTopics()
Collection of Topics held by this instance.
public MBeanContainer createMBean()
throws java.lang.Exception
MBeanFactoryObjectName, that are
returned in a MBeanContainer.
createMBean in interface MBeanFactoryMBeanContainer
java.lang.Exception - if a problem occurs while creating the MBean or its
object name.public static PerfAnalyzer getInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||