public class HistoricMetric
Class HistoricMetric. Provides historicmetric functionality for the Hytale server.
java.lang.Object > HistoricMetric
Field Summary
bufferSize
final
int
bufferSize
Field bufferSize.
values
final
long[]
values
Field values.
start
final
int
start
Field start.
nextIndex
final
int
nextIndex
Field nextIndex.
value
final
long
value
Field value.
periodsNanos
final
long[]
periodsNanos
Field periodsNanos.
periodAverages
final
AverageCollector[]
periodAverages
Field periodAverages.
startIndices
final
int[]
startIndices
Field startIndices.
timestamps
final
long[]
timestamps
Field timestamps.
oldestPossibleTimestamp
final
long
oldestPossibleTimestamp
Field oldestPossibleTimestamp.
average
final
AverageCollector
average
Field average.
oldValue
final
long
oldValue
Field oldValue.
length
final
int
length
Field length.
data
final
long[]
data
Field data.
last
final
long
last
Field last.
nanos
final
long
nanos
Field nanos.
Method Detail
HistoricMetric
public
private
HistoricMetric
()
Method HistoricMetric.
getPeriodsNanos
public
long[]
getPeriodsNanos
()
Method getPeriodsNanos.
calculateMin
public
long
calculateMin
(final int periodIndex)
Method calculateMin.
- Parameters:
final intperiodIndex
getAverage
public
double
getAverage
(final int periodIndex)
Method getAverage.
- Parameters:
final intperiodIndex
calculateMax
public
long
calculateMax
(final int periodIndex)
Method calculateMax.
- Parameters:
final intperiodIndex
clear
public
void
clear
()
Method clear.
add
public
void
add
(final long timestampNanos, final long value)
Method add.
- Parameters:
final longtimestampNanosfinal longvalue
getTimestamps
public
long[]
getTimestamps
(final int periodIndex)
Method getTimestamps.
- Parameters:
final intperiodIndex
getValues
public
long[]
getValues
(final int periodIndex)
Method getValues.
- Parameters:
final intperiodIndex
getAllTimestamps
public
long[]
getAllTimestamps
()
Method getAllTimestamps.
getAllValues
public
long[]
getAllValues
()
Method getAllValues.
setAllTimestamps
public
void
setAllTimestamps
(@Nonnull final long[] timestamps)
Method setAllTimestamps.
- Parameters:
@Nonnull final long[]timestamps
setAllValues
public
void
setAllValues
(@Nonnull final long[] values)
Method setAllValues.
- Parameters:
@Nonnull final long[]values
getLastValue
public
long
getLastValue
()
Method getLastValue.
builder
Method builder.
- Parameters:
final longminimumInterval@Nonnull final TimeUnitunit
KeyedCodec
public
new
KeyedCodec
("Timestamps", Codec.LONG_ARRAY)
Method KeyedCodec.
- Parameters:
"Timestamps""Timestamps"Codec.LONG_ARRAYCodec.LONG_ARRAY
addPeriod
Method addPeriod.
- Parameters:
final longperiod@Nonnull final TimeUnitunit