|
||||||||||
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 setter methods. |
|
GroupedTimingStatistics(java.util.Collection<StopWatch> timeRecords,
long startTime,
long stopTime,
boolean createRollupStatistics)
Creates a GroupedTimingStatistics by separating a collection of StopWatch instances by tag and calculating statistics for each tag. |
|
GroupedTimingStatistics(java.util.SortedMap<java.lang.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 |
clone()
|
boolean |
equals(java.lang.Object o)
|
long |
getStartTime()
|
java.util.SortedMap<java.lang.String,TimingStatistics> |
getStatisticsByTag()
|
long |
getStopTime()
|
int |
hashCode()
|
boolean |
isCreateRollupStatistics()
|
void |
setCreateRollupStatistics(boolean createRollupStatistics)
|
void |
setStartTime(long startTime)
|
void |
setStatisticsByTag(java.util.SortedMap<java.lang.String,TimingStatistics> statisticsByTag)
|
void |
setStopTime(long stopTime)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GroupedTimingStatistics()
public GroupedTimingStatistics(java.util.SortedMap<java.lang.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.public GroupedTimingStatistics(java.util.Collection<StopWatch> timeRecords, long startTime, long stopTime, boolean createRollupStatistics)
timeRecords
- The collection of logged StopWatch instancesstartTime
- 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 java.util.SortedMap<java.lang.String,TimingStatistics> getStatisticsByTag()
public void setStatisticsByTag(java.util.SortedMap<java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
public GroupedTimingStatistics clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |