@Immutable public static class SamplingUtils.MetricsWindow extends Object
MetricSampleAggregator
,
for which the LoadMonitorTaskRunner
samples metrics in batches of one window.Constructor and Description |
---|
MetricsWindow(long startMs,
long endMs,
long index) |
Modifier and Type | Method and Description |
---|---|
static SamplingUtils.MetricsWindow |
empty(long windowSizeMs)
Returns an empty metric windows to act as a placeholder.
|
long |
endMsInclusive()
Returns the end boundary of this window, in milliseconds since epoch time.
|
boolean |
equals(Object o) |
int |
hashCode() |
long |
index()
Return the unique monotonically-increasing index of this window.
|
SamplingUtils.MetricsWindow |
nextWindow() |
SamplingUtils.MetricsWindow |
previousWindow() |
long |
sizeMs()
Return the size of the window, in milliseconds.
|
long |
startMs()
Returns the start boundary of this window, in milliseconds since epoch time.
|
String |
toConciseString() |
String |
toString() |
public MetricsWindow(long startMs, long endMs, long index)
startMs
- the start ms of this window, inclusive.endMs
- the end ms of this window, exclusive. i.e a window from 120_000L to 240_000L will consist of metrics from 120_000->239_999L.index
- the index of this window.public static SamplingUtils.MetricsWindow empty(long windowSizeMs)
public long sizeMs()
public long index()
public SamplingUtils.MetricsWindow nextWindow()
public SamplingUtils.MetricsWindow previousWindow()
public long startMs()
public long endMsInclusive()
public String toConciseString()