com.groupon.sparklint.data

CompressedMetricsSink

class CompressedMetricsSink extends MetricsSink

A constant-memory-complexity data structure to store time series data points

It produces a ganglia-like feature, that if the new data to be added is newer than the maximum this can contain, a compact will be performed to increase the resolution (time range each bucket contains) according to getNextResolution, so this data structure can record newer data without losing the earliest data points.

When first created, the size of the array will be the number of buckets to keep in memory The time range represented by each bucket is configured by resolution

Since

8/11/16.

Linear Supertypes
MetricsSink, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CompressedMetricsSink
  2. MetricsSink
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CompressedMetricsSink(resolution: Long, dataRange: Option[Interval], origin: Long, storage: Array[Long])

    resolution

    The time range that each bucket represents, in milliseconds

    dataRange

    The time range that this sink represents

    origin

    the actual time for time0 in this data structure

    storage

    for each bucket, sum of millis spend in calculation

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addUsage(startTime: Long, endTime: Long, weight: Int = 1): CompressedMetricsSink

    Definition Classes
    CompressedMetricsSinkMetricsSink
  7. def apply(index: Int): Long

    Definition Classes
    MetricsSink
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def batchAddUsage(pairs: Seq[(Long, Long)], weight: Int): CompressedMetricsSink

    Definition Classes
    CompressedMetricsSinkMetricsSink
  10. lazy val bucketEnd: Long

    Definition Classes
    MetricsSink
  11. lazy val bucketStart: Long

    Definition Classes
    MetricsSink
  12. def changeResolution(toResolution: Long): CompressedMetricsSink

    Definition Classes
    CompressedMetricsSinkMetricsSink
  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def convertToUsageDistribution: Map[Int, Long]

    Get usage distribution

    Get usage distribution

    returns

    Definition Classes
    MetricsSink
  15. val dataRange: Option[Interval]

    The time range that this sink represents

    The time range that this sink represents

    Definition Classes
    CompressedMetricsSinkMetricsSink
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def getAvgValueForTime(time: Long): Option[Double]

    Definition Classes
    MetricsSink
  20. def getBucket(index: Int): Option[Long]

    Definition Classes
    MetricsSink
  21. def getBucketIndex(time: Long): Int

    Definition Classes
    MetricsSink
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def getValueForTime(time: Long): Option[Long]

    Definition Classes
    MetricsSink
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. lazy val length: Int

    Definition Classes
    MetricsSink
  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def nonEmpty: Boolean

    Definition Classes
    MetricsSink
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. def removeUsage(startTime: Long, endTime: Long, weight: Int = 1): CompressedMetricsSink

    Definition Classes
    CompressedMetricsSinkMetricsSink
  32. val resolution: Long

    The time range that each bucket represents, in milliseconds

    The time range that each bucket represents, in milliseconds

    Definition Classes
    CompressedMetricsSinkMetricsSink
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from MetricsSink

Inherited from AnyRef

Inherited from Any

Ungrouped