RollingBuffer

com.netflix.atlas.core.algorithm.RollingBuffer
See theRollingBuffer companion object
class RollingBuffer(val values: Array[Double], start: Int)

Buffer for tracking the last N values of a time series.

Value parameters

start

Starting position within the array. This is typically only used when restoring from state captured from another buffer.

values

Underlying array that is used to store the values. As new data is added it will roll through the array and overwrite old values that are now out of the window. The window size is the size of the array.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(v: Double): Double
def clear(): Unit
def count: Double
def isEmpty: Boolean
def max: Double
def min: Double
def sum: Double
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Concrete fields

var size: Int

Returns the number of non-NaN values that are currently in the buffer.

Returns the number of non-NaN values that are currently in the buffer.

Attributes

val values: Array[Double]