|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.performance.Statistics
public class Statistics
Container for SummaryStatistics
accumulated during
ClientThread
executions.
Maintains a HashMap of SummaryStatistics
instances with a composite
key of the form (process,type). "Process" typically identifies the client
thread and "type" identifies the metric - e.g., "latency", "numActive."
ClientThread.run()
adds one SummaryStatistics
instance, with key = (current thread id,"latency").
Constructor Summary | |
---|---|
Statistics()
|
Method Summary | |
---|---|
void |
addStatistics(SummaryStatistics stats,
String process,
String type)
Adds the results of the given SummaryStatistics instance under the key |
String |
displayOverallSummary()
Computes and formats display of summary statistics by type, across processes. |
String |
displayProcessStatistics(String process)
Displays statistics for the given process |
SummaryStatistics |
getMaxSummary(String type)
Returns SummaryStatistics for the maximum of the given metric across processes. |
SummaryStatistics |
getMeanSummary(String type)
Returns a SummaryStatistics instance describing the mean of the given metric across processes - i.e., the "mean of the means", the "min of the means" etc. |
SummaryStatistics |
getMinSummary(String type)
Returns SummaryStatistics for the minimum of the given metric across processes. |
List<String> |
getProcesses()
Returns the List of processes corresponding to statistics. |
SummaryStatistics |
getStatistics(String process,
String type)
Retrieves the SummaryStatistics corresponding to the given process and type, if this exists; null otherwise. |
List<SummaryStatistics> |
getStatisticsByProcess(String process)
Returns the full list of SummaryStatistics corresponding to the given process - i.e, the list of statistics of
of different types maintained for the given process. |
List<SummaryStatistics> |
getStatisticsByType(String type)
Returns the full list of SummaryStatistics corresponding to the given type - i.e, the list of statistics of the
given type across processes. |
SummaryStatistics |
getStdSummary(String type)
Returns SummaryStatistics for the standard deviation of the given metric across processes. |
List<String> |
getTypes()
Returns the List of types corresponding to statistics. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Statistics()
Method Detail |
---|
public void addStatistics(SummaryStatistics stats, String process, String type)
stats
- the SummaryStatistics whose results we are addingprocess
- name of the associated processtype
- description of the associated metricpublic SummaryStatistics getStatistics(String process, String type)
process
- name of the associated processtype
- description of the associated metric
public List<SummaryStatistics> getStatisticsByType(String type)
type
- i.e, the list of statistics of the
given type across processes. For example,
getStatisticsByType("latency")
will return a list of latency
summaries, one for each process, assuming "latency" is the name of
an accumulated metric.
type
- the type value to get statistics for
public List<SummaryStatistics> getStatisticsByProcess(String process)
process
- i.e, the list of statistics of
of different types maintained for the given process.
process
- the process to get statistics for
public SummaryStatistics getMeanSummary(String type)
Returns a SummaryStatistics instance describing the mean of the given metric across processes - i.e., the "mean of the means", the "min of the means" etc. More precisely, the returned SummaryStatistics describes the distribution of the individual process means for the given metric.
The same results could be obtained by iterating over the result of
{getStatisticsByType(String)
for the given type
,
extracting the mean and adding its value to a SummaryStatistics
instance.
type
- the metric to get summary mean statistics for
public SummaryStatistics getStdSummary(String type)
type
- the metric to get summary standard deviation statistics for
getMeanSummary(String)
public SummaryStatistics getMinSummary(String type)
type
- the metric to get summary minimum statistics for
getMeanSummary(String)
public SummaryStatistics getMaxSummary(String type)
type
- the metric to get summary maximum statistics for
getMeanSummary(String)
public List<String> getProcesses()
public List<String> getTypes()
public String displayOverallSummary()
public String displayProcessStatistics(String process)
process
- the process to retrieve metrics for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |