|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.TimeSeries
@ExportedBean public final class TimeSeries
Scalar value that changes over the time (such as load average, Q length, # of executors, etc.)
This class computes
the exponential moving average from the raw data (to be supplied by update(float)
).
Constructor Summary | |
---|---|
TimeSeries(float initialValue,
float decay,
int historySize)
|
Method Summary | |
---|---|
float[] |
getHistory()
Gets the history data of the exponential moving average. |
float |
getLatest()
Gets the most up-to-date data point value. |
String |
toString()
|
void |
update(float newData)
Pushes a new data point. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeSeries(float initialValue, float decay, int historySize)
Method Detail |
---|
public void update(float newData)
Exponential moving average is calculated, and the history
is updated.
This method needs to be called periodically and regularly, and it represents
the raw data stream.
@Exported public float[] getHistory()
@Exported public float getLatest()
getHistory[0]
.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |