|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.statistics.OperationStatistics
public final class OperationStatistics
A local (operation's) list of statistics. This is typically used to retrieve statistics only during a single operation execution - the statistics registered in this collection are not influenced by other running operations (or other methods possibly modyfying statistics).
To retrieve a statistic, use binding
.
There are several methods to ease the task of biding a OperationStatistics
to global statistics, such as registerBoundStat(java.lang.String)
.
Field Summary | |
---|---|
protected messif.statistics.StatisticsList |
statistics
Local operation statistic objects |
Constructor Summary | |
---|---|
protected |
OperationStatistics()
Creates a new instance of OperationStatistics |
Method Summary | ||
---|---|---|
protected void |
finalize()
Destructor - unbind all binded objects |
|
java.util.Iterator<Statistics<?>> |
getAllStatistics()
Access all statistics |
|
java.util.Iterator<Statistics<?>> |
getAllStatistics(java.lang.String regex)
Access statistics whose names match the given regular expression |
|
static OperationStatistics |
getLocalThreadStatistics()
OperationStatistics creator |
|
static StatisticCounter |
getOpStatisticCounter(java.lang.String name)
Returns statistics counter from current thread operation statistics namespace |
|
static StatisticMinMaxCounter |
getOpStatisticMinMaxCounter(java.lang.String name)
Returns statistics counter from current thread operation statistics namespace |
|
static StatisticRefCounter |
getOpStatisticRefCounter(java.lang.String name)
Returns statistics reference counter from current thread operation statistics namespace |
|
static
|
getOpStatistics(java.lang.String name,
java.lang.Class<? extends T> statisticsClass)
Returns statistics counter from current thread operation statistics namespace |
|
StatisticCounter |
getStatisticCounter(java.lang.String name)
Returns statistics counter from this operation statistics namespace |
|
StatisticMinMaxCounter |
getStatisticMinMaxCounter(java.lang.String name)
Returns statistics minmaxcounter from this operation statistics namespace |
|
StatisticRefCounter |
getStatisticRefCounter(java.lang.String name)
Returns statistics reference counter from this operation statistics namespace |
|
|
getStatistics(java.lang.String statisticName,
java.lang.Class<? extends T> statisticClass)
Return a statistics of defined class from this operation statistics namespace |
|
java.lang.String |
printStatistics()
Returns String containing current states of registered statistics |
|
java.lang.String |
printStatistics(java.lang.String regex)
Returns String containing current states of registered statistics with names matching the provided regular expression |
|
java.lang.String |
printStatistics(java.lang.String regex,
java.lang.String statSeparator)
Returns String containing current states of registered statistics with names matching the provided regular expression and separated by specified separator |
|
void |
registerBoundAllStats(java.lang.String regex)
In this operation statistics namespace, register and bind statistics which are present in the global namespace and match the given regular expression. |
|
|
registerBoundStat(java.lang.Class<? extends T> statClass,
java.lang.String name,
java.lang.String asName)
Register bound statistic (using asName name) in this operation statistics namespace. |
|
Statistics<?> |
registerBoundStat(java.lang.String name)
Register bound statistic in this operation statistics namespace |
|
protected
|
registerBoundStat(java.lang.String asName,
Statistics<T> bindToStat)
Register statistic in this operation statistics namespace. |
|
Statistics<?> |
registerBoundStat(java.lang.String name,
java.lang.String asName)
Register bound statistic (using asName name) in this operation statistics namespace |
|
boolean |
removeStatistic(java.lang.String name)
Removes given statistic. |
|
static void |
resetLocalThreadStatistics()
Reset current thread statistic |
|
void |
resetStatistics()
Resets all statistics within this operation statistic object. |
|
void |
resetStatistics(java.lang.String regex)
Resets statistics within this operation statistic object names of which match the regular expression |
|
java.lang.String |
toString()
|
|
void |
unbindAllStats()
Unbind all stored statistics from their parents. |
|
void |
unbindAllStats(java.lang.String regex)
Unbind statistics matching the regular expression from their parents |
|
void |
updateFrom(OperationStatistics sourceStats)
Update this statistics with other operation statistics values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final messif.statistics.StatisticsList statistics
Constructor Detail |
---|
protected OperationStatistics()
Method Detail |
---|
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public static OperationStatistics getLocalThreadStatistics()
public static void resetLocalThreadStatistics()
public java.util.Iterator<Statistics<?>> getAllStatistics()
public java.util.Iterator<Statistics<?>> getAllStatistics(java.lang.String regex)
public java.lang.String printStatistics(java.lang.String regex, java.lang.String statSeparator)
public java.lang.String printStatistics(java.lang.String regex)
public java.lang.String printStatistics()
public void resetStatistics(java.lang.String regex)
public void resetStatistics()
public <T extends Statistics<T>> T getStatistics(java.lang.String statisticName, java.lang.Class<? extends T> statisticClass) throws java.lang.ClassCastException
java.lang.ClassCastException
public static <T extends Statistics<T>> T getOpStatistics(java.lang.String name, java.lang.Class<? extends T> statisticsClass) throws java.lang.ClassCastException
java.lang.ClassCastException
public StatisticCounter getStatisticCounter(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public static StatisticCounter getOpStatisticCounter(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public StatisticMinMaxCounter getStatisticMinMaxCounter(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public static StatisticMinMaxCounter getOpStatisticMinMaxCounter(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public StatisticRefCounter getStatisticRefCounter(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public static StatisticRefCounter getOpStatisticRefCounter(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public boolean removeStatistic(java.lang.String name)
public <T extends Statistics<T>> T registerBoundStat(java.lang.Class<? extends T> statClass, java.lang.String name, java.lang.String asName) throws java.lang.ClassCastException
java.lang.ClassCastException
protected <T extends Statistics<T>> T registerBoundStat(java.lang.String asName, Statistics<T> bindToStat) throws java.lang.ClassCastException
asName
will be used and the same class as the bindToStat
.
If there is a statistics with this name already, the statistic is not created
but the old one is used instead.
asName
- the name of the statistic in this operation statistics namespacebindToStat
- the statistics to which the new statistics is bound
java.lang.ClassCastException
- if there is a statistics with this name, but has different class than bindToStat
public Statistics<?> registerBoundStat(java.lang.String name, java.lang.String asName) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public Statistics<?> registerBoundStat(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void registerBoundAllStats(java.lang.String regex)
public void unbindAllStats(java.lang.String regex)
public void unbindAllStats()
public void updateFrom(OperationStatistics sourceStats) throws java.lang.IllegalArgumentException
sourceStats
- the operation statistics that are merged with this ones
java.lang.IllegalArgumentException
- if there was a statistic of the same name
in both this and sourceStats
but with of different classpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |