|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.util.core.PerformanceStateCore
public abstract class PerformanceStateCore
This class is the root for performance counters. Using them is as simple as can possibly be.
For example if you wanted to track how many cluster reconstitutes there were:
private static final ClusterRootReconstitutes = new PerformanceStateCounter("Cluster Root Reconstitutes");
...
ClusterRootReconstitutes.addCount();
You can (and should) declare the counter as a static object. But whenever it is used, the statistics are recorded and saved on a per thread basis.
The implementation of perf state objects is split into two peices: the static "handle" used by clients, and an inner class (called Instance) that actually stores the data. The methods on the outer class provide a convenience for accessing common operations. One can always "reach through" to the underlying per-thread instance to access the full API. For instance: ClusterRootReconstitutes.addCount(); is a convenience for: ((PerformanceStateCounter.Instance)ClusterRootReconstitutes.Instance()).addCount();
Nested Class Summary | |
---|---|
static class |
PerformanceStateCore.EventDetail
|
static class |
PerformanceStateCore.Instance
the real data bearing instance |
static interface |
PerformanceStateCore.MetricObserver
|
Field Summary | |
---|---|
static int |
LOG_COUNT
|
static int |
LOG_EVENTS
|
static int |
LOG_TIME
|
static java.util.Comparator |
LogRankComparator
Is a Comparator that compares PerformanceStateCores
on the basis of their log ranks . |
Constructor Summary | |
---|---|
PerformanceStateCore(java.lang.String name)
|
|
PerformanceStateCore(java.lang.String name,
int logRank)
|
|
PerformanceStateCore(java.lang.String name,
int logRank,
int logFlags)
Create a performance counter with the given name. |
Method Summary | |
---|---|
void |
appendCSVData(FormatBuffer buf,
PerformanceState.Stats stats)
|
void |
appendCSVHeaders(FormatBuffer buf)
|
static int |
getGlobalStackTraceCaptureThreshold()
The number of events with a given signature before we capture a backtrace in the EventDetail |
int |
getLogRank()
|
java.lang.String |
getName()
Returns the name for this performace state object. |
boolean |
hasSameNameAs(PerformanceStateCore that)
Returns whether this has the same name as that . |
PerformanceStateCore.Instance |
instance()
Not a static method, but it returns the object to be used as a "this" on operations much the way static methods are used to return a singelton. |
static void |
setGlobalStackTraceCaptureThreshold(int count)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LOG_COUNT
public static final int LOG_TIME
public static final int LOG_EVENTS
public static final java.util.Comparator LogRankComparator
Comparator
that compares PerformanceStateCores
on the basis of their log ranks
.
Constructor Detail |
---|
public PerformanceStateCore(java.lang.String name, int logRank, int logFlags)
public PerformanceStateCore(java.lang.String name, int logRank)
public PerformanceStateCore(java.lang.String name)
Method Detail |
---|
public java.lang.String getName()
public boolean hasSameNameAs(PerformanceStateCore that)
this
has the same name as that
.
public int getLogRank()
public void appendCSVData(FormatBuffer buf, PerformanceState.Stats stats)
public void appendCSVHeaders(FormatBuffer buf)
public PerformanceStateCore.Instance instance()
public static int getGlobalStackTraceCaptureThreshold()
public static void setGlobalStackTraceCaptureThreshold(int count)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |