org.javasimon.callback.timeline
Class StopwatchTimeline
java.lang.Object
org.javasimon.callback.timeline.Timeline<StopwatchTimeRange>
org.javasimon.callback.timeline.StopwatchTimeline
public final class StopwatchTimeline
- extends Timeline<StopwatchTimeRange>
Timeline for Stopwatches, historicise Stopwatch state on a
rolling period of time.
- Author:
- gerald
|
Constructor Summary |
StopwatchTimeline(int capacity,
long timeRangeWidth)
Main constructor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StopwatchTimeline
public StopwatchTimeline(int capacity,
long timeRangeWidth)
- Main constructor
- Parameters:
capacity - Number of time range.timeRangeWidth - Width of each time range
createTimeRange
protected StopwatchTimeRange createTimeRange(long startTimestamp,
long endTimestamp)
- Produces a
StopwatchTimeRange object
- Specified by:
createTimeRange in class Timeline<StopwatchTimeRange>
- Parameters:
startTimestamp - Range beginningendTimestamp - Range ending
- Returns:
StopwatchTimeRange object
addSplit
public void addSplit(Split split)
- Main method used to insert the split on the timeline:
- Split start is used to determine in which timerange it should be split. A new time range may be created if needed.
- Split duration is added to time range statistics.
The split might be drop if it's too old.
- Parameters:
split - Split
sample
public TimelineSample<StopwatchTimeRange> sample()
- Take a snapshot of the timeline.
- Specified by:
sample in class Timeline<StopwatchTimeRange>
- Returns:
- Timeline sample
Copyright © 2013. All Rights Reserved.