|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.perf4j.GroupedTimingStatistics
public class GroupedTimingStatistics
Represents a set of TimingStatistics calculated for a specific time period for a set of tags.
Constructor Summary | |
---|---|
GroupedTimingStatistics()
Default constructor allows you to set statistics later using the addStopWatch and setter methods. |
|
GroupedTimingStatistics(SortedMap<String,TimingStatistics> statisticsByTag,
long startTime,
long stopTime,
boolean createRollupStatistics)
Creates a GroupedTimingStatistics instance for a set of tags for a specified time span. |
Method Summary | |
---|---|
GroupedTimingStatistics |
addStopWatch(StopWatch stopWatch)
This method updates the calculated statistics when a new logged StopWatch is added. |
GroupedTimingStatistics |
addStopWatches(Collection<StopWatch> stopWatches)
Updates these statistics with all of the StopWatches in the specified collection. |
GroupedTimingStatistics |
clone()
|
boolean |
equals(Object o)
|
long |
getStartTime()
|
SortedMap<String,TimingStatistics> |
getStatisticsByTag()
|
long |
getStopTime()
|
int |
hashCode()
|
boolean |
isCreateRollupStatistics()
|
void |
setCreateRollupStatistics(boolean createRollupStatistics)
|
void |
setStartTime(long startTime)
|
void |
setStatisticsByTag(SortedMap<String,TimingStatistics> statisticsByTag)
|
void |
setStopTime(long stopTime)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GroupedTimingStatistics()
public GroupedTimingStatistics(SortedMap<String,TimingStatistics> statisticsByTag, long startTime, long stopTime, boolean createRollupStatistics)
statisticsByTag
- This Map maps String tag times to the aggregated TimingStatistics for that tag.startTime
- The start time (as reported by System.currentTimeMillis()) of the time span
for which the statistics apply.stopTime
- The end time of the time span for which the statistics apply.createRollupStatistics
- Whether or not the statisticsByTag contains "rollup statistics". Rollup statistics
allow users to time different execution paths of the same code block. For example,
when timing a code block, one may which to log execution time with a
"codeBlock.success" tag when execution completes normally and a "codeBlock.failure"
tag when an exception is thrown. If rollup statistics are used, then in addition
to the codeBlock.success and codeBlock.failure tags, a codeBlock tag is created
that represents StopWatch logs from EITHER the success or failure tags.Method Detail |
---|
public GroupedTimingStatistics addStopWatch(StopWatch stopWatch)
stopWatch
- The StopWatch being used to update the statistics.
public GroupedTimingStatistics addStopWatches(Collection<StopWatch> stopWatches)
stopWatches
- The collection of StopWatches to add to this GroupedTimingStatistics data set.
public SortedMap<String,TimingStatistics> getStatisticsByTag()
public void setStatisticsByTag(SortedMap<String,TimingStatistics> statisticsByTag)
public long getStartTime()
public void setStartTime(long startTime)
public long getStopTime()
public void setStopTime(long stopTime)
public boolean isCreateRollupStatistics()
public void setCreateRollupStatistics(boolean createRollupStatistics)
public String toString()
toString
in class Object
public GroupedTimingStatistics clone()
clone
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |