@Beta public abstract class DurationStatisticsTracker extends Object
Constructor and Description |
---|
DurationStatisticsTracker() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addDuration(long duration)
Add a duration to track.
|
static DurationStatisticsTracker |
createConcurrent()
Create a concurrent
DurationStatisticsTracker , which performs well
in very contended environments. |
static DurationStatisticsTracker |
createSynchronized()
Create a synchronized
DurationStatisticsTracker , which performs well
in non-contended environments. |
abstract double |
getAverageDuration()
Returns the average duration in nanoseconds.
|
String |
getDisplayableAverageDuration()
Returns the average duration as a displayable String with units, e.g.
|
String |
getDisplayableLongestDuration()
Returns the longest duration as a displayable String with units and the
date/time at which it occurred, e.g.
|
String |
getDisplayableShortestDuration()
Returns the shortest duration as a displayable String with units and the
date/time at which it occurred, e.g.
|
protected abstract org.opendaylight.yangtools.util.DurationWithTime |
getLongest()
Get the longest recorded duration and the time when it was recorded.
|
long |
getLongestDuration()
Returns the longest duration in nanoseconds.
|
protected abstract org.opendaylight.yangtools.util.DurationWithTime |
getShortest()
Get the shortest recorded duration and the time when it was recorded.
|
long |
getShortestDuration()
Returns the shortest duration in nanoseconds.
|
long |
getTimeOfLongestDuration()
Returns the time stamp of the longest duration.
|
long |
getTimeOfShortestDuration()
Returns the time stamp of the shortest duration.
|
abstract long |
getTotalDurations()
Returns the total number of tracked durations.
|
abstract void |
reset()
Resets all statistics back to their defaults.
|
public static DurationStatisticsTracker createConcurrent()
DurationStatisticsTracker
, which performs well
in very contended environments.public static DurationStatisticsTracker createSynchronized()
DurationStatisticsTracker
, which performs well
in non-contended environments.public abstract void addDuration(long duration)
duration
- non-negative duration in nanoseconds.public abstract double getAverageDuration()
public abstract long getTotalDurations()
reset()
.public abstract void reset()
protected abstract org.opendaylight.yangtools.util.DurationWithTime getShortest()
protected abstract org.opendaylight.yangtools.util.DurationWithTime getLongest()
public final long getLongestDuration()
public final long getShortestDuration()
public final String getDisplayableAverageDuration()
public final String getDisplayableLongestDuration()
public final String getDisplayableShortestDuration()
public final long getTimeOfLongestDuration()
public final long getTimeOfShortestDuration()
Copyright © 2019 OpenDaylight. All rights reserved.