Object

com.twitter.ostrich.stats

Stats

Related Doc: package stats

Permalink

object Stats extends StatsCollection

Singleton StatsCollector that collects performance data for the application.

Linear Supertypes
StatsCollection, JsonSerializable, StatsProvider, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Stats
  2. StatsCollection
  3. JsonSerializable
  4. StatsProvider
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addGauge(name: String)(gauge: ⇒ Double): Unit

    Permalink

    Add a gauge function, which is used to sample instantaneous values.

    Add a gauge function, which is used to sample instantaneous values.

    Definition Classes
    StatsCollectionStatsProvider
  5. def addListener(listener: StatsListener): Unit

    Permalink

    Attach a new StatsListener to this collection.

    Attach a new StatsListener to this collection. Additions to metrics will be passed along to each listener.

    Definition Classes
    StatsCollection
  6. def addMetric(name: String, distribution: Distribution): Unit

    Permalink

    Adds a set of values to a named metric.

    Adds a set of values to a named metric. Effectively the incoming distribution is merged with the named metric.

    Definition Classes
    StatsProvider
  7. def addMetric(name: String, value: Int): Unit

    Permalink

    Adds a value to a named metric, which tracks min, max, mean, and a histogram.

    Adds a value to a named metric, which tracks min, max, mean, and a histogram.

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

    Permalink
    Definition Classes
    Any
  9. def clearAll(): Unit

    Permalink

    Reset all collected stats and erase the history.

    Reset all collected stats and erase the history. Probably only useful for unit tests.

    Definition Classes
    StatsCollectionStatsProvider
  10. def clearGauge(name: String): Unit

    Permalink

    Remove a gauge from the provided stats.

    Remove a gauge from the provided stats.

    Definition Classes
    StatsCollectionStatsProvider
  11. def clearLabel(name: String): Unit

    Permalink

    Clear an existing label.

    Clear an existing label.

    Definition Classes
    StatsCollectionStatsProvider
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. val counterMap: ConcurrentHashMap[String, Counter]

    Permalink
    Attributes
    protected
    Definition Classes
    StatsCollection
  14. def delta(oldValue: Long, newValue: Long): Long

    Permalink
  15. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def fillInJvmCounters(out: Map[String, Long]): Unit

    Permalink
    Definition Classes
    StatsCollection
  18. def fillInJvmGauges(out: Map[String, Double]): Unit

    Permalink

    Use JMX (shudder) to fill in stats about the JVM into a mutable map.

    Use JMX (shudder) to fill in stats about the JVM into a mutable map.

    Definition Classes
    StatsCollection
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. val gaugeMap: ConcurrentHashMap[String, () ⇒ Double]

    Permalink
    Attributes
    protected
    Definition Classes
    StatsCollection
  21. def get(name: String): StatsCollection

    Permalink

    Return a named StatsCollection as defined in an AdminServiceConfig.

    Return a named StatsCollection as defined in an AdminServiceConfig. If the named collection doesn't exist, the global stats object is returned.

  22. def get(): StatsSummary

    Permalink

    Summarize all the counters, metrics, gauges, and labels in this collection.

    Summarize all the counters, metrics, gauges, and labels in this collection.

    Definition Classes
    StatsProvider
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def getCounter(name: String): Counter

    Permalink

    Get the Counter object representing a named counter.

    Get the Counter object representing a named counter.

    Definition Classes
    StatsCollectionStatsProvider
  25. def getCounters(): HashMap[String, Long]

    Permalink

    Summarize all the counters in this collection.

    Summarize all the counters in this collection.

    Definition Classes
    StatsCollectionStatsProvider
  26. def getGauge(name: String): Option[Double]

    Permalink

    Get the current value of a named gauge.

    Get the current value of a named gauge.

    Definition Classes
    StatsCollectionStatsProvider
  27. def getGauges(): HashMap[String, Double]

    Permalink

    Summarize all the gauges in this collection.

    Summarize all the gauges in this collection.

    Definition Classes
    StatsCollectionStatsProvider
  28. def getLabel(name: String): Option[String]

    Permalink

    Get the current value of a named label, if it exists.

    Get the current value of a named label, if it exists.

    Definition Classes
    StatsCollectionStatsProvider
  29. def getLabels(): Map[String, String]

    Permalink

    Summarize all the labels in this collection.

    Summarize all the labels in this collection.

    Definition Classes
    StatsCollectionStatsProvider
  30. def getMetric(name: String): Metric

    Permalink

    Get the Metric object representing a named metric.

    Get the Metric object representing a named metric.

    Definition Classes
    StatsCollectionStatsProvider
  31. def getMetrics(): HashMap[String, Distribution]

    Permalink

    Summarize all the metrics in this collection.

    Summarize all the metrics in this collection.

    Definition Classes
    StatsCollectionStatsProvider
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. var includeJvmStats: Boolean

    Permalink

    Set this to true to have the collection fill in a set of automatic gauges from the JVM.

    Set this to true to have the collection fill in a set of automatic gauges from the JVM.

    Definition Classes
    StatsCollection
  34. def incr(name: String): Long

    Permalink

    Increments a counter by one, returning the new value.

    Increments a counter by one, returning the new value.

    Definition Classes
    StatsProvider
  35. def incr(name: String, count: Int): Long

    Permalink

    Increments a counter, returning the new value.

    Increments a counter, returning the new value.

    Definition Classes
    StatsProvider
  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. val labelMap: ConcurrentHashMap[String, String]

    Permalink
    Attributes
    protected
    Definition Classes
    StatsCollection
  38. val log: Logger

    Permalink
    Definition Classes
    StatsProvider
  39. def make(name: String): StatsCollection

    Permalink

    Make a named StatsCollection, or return an existing collection if one already exists under that name.

  40. def makeCounter(name: String, atomic: AtomicLong): Counter

    Permalink
    Definition Classes
    StatsCollection
  41. def makeDeltaFunction(counter: Counter): () ⇒ Double

    Permalink

    Create a function that returns the delta of a counter each time it's called.

  42. val metricMap: ConcurrentHashMap[String, Metric]

    Permalink
    Attributes
    protected
    Definition Classes
    StatsCollection
  43. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  44. def newCounter(name: String): Counter

    Permalink
    Attributes
    protected
    Definition Classes
    StatsCollection
  45. def newMetric(name: String): Metric

    Permalink
    Attributes
    protected
    Definition Classes
    StatsCollection
  46. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  47. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  48. def removeCounter(name: String): Unit

    Permalink
    Definition Classes
    StatsCollection
  49. def removeMetric(name: String): Option[Metric]

    Permalink
    Definition Classes
    StatsCollection
  50. def setGauge(name: String, value: Double): Unit

    Permalink

    Set a gauge to a specific value.

    Set a gauge to a specific value. This overwrites any previous value or function.

    Definition Classes
    StatsProvider
  51. def setLabel(name: String, value: String): Unit

    Permalink

    Set a label to a string.

    Set a label to a string.

    Definition Classes
    StatsCollectionStatsProvider
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. def time[T](name: String)(f: ⇒ T): T

    Permalink

    Runs the function f and logs that duration, in milliseconds, with the given name.

    Runs the function f and logs that duration, in milliseconds, with the given name.

    Definition Classes
    StatsProvider
  54. def timeFutureMicros[T](name: String)(f: Future[T]): Future[T]

    Permalink

    Runs the function f and logs that duration until the future is satisfied, in microseconds, with the given name.

    Runs the function f and logs that duration until the future is satisfied, in microseconds, with the given name.

    Definition Classes
    StatsProvider
  55. def timeFutureMillisLazy[T](name: String)(f: ⇒ Future[T]): Future[T]

    Permalink

    Lazily runs the Future that f returns and measure the duration of Future creation and time until it is satisfied, in milliseconds, with the given name

    Lazily runs the Future that f returns and measure the duration of Future creation and time until it is satisfied, in milliseconds, with the given name

    Definition Classes
    StatsProvider
  56. def timeFutureNanos[T](name: String)(f: Future[T]): Future[T]

    Permalink

    Runs the function f and logs that duration until the future is satisfied, in nanoseconds, with the given name.

    Runs the function f and logs that duration until the future is satisfied, in nanoseconds, with the given name.

    Definition Classes
    StatsProvider
  57. def timeMicros[T](name: String)(f: ⇒ T): T

    Permalink

    Runs the function f and logs that duration, in microseconds, with the given name.

    Runs the function f and logs that duration, in microseconds, with the given name.

    Definition Classes
    StatsProvider
  58. def timeNanos[T](name: String)(f: ⇒ T): T

    Permalink

    Runs the function f and logs that duration, in nanoseconds, with the given name.

    Runs the function f and logs that duration, in nanoseconds, with the given name.

    Definition Classes
    StatsProvider
  59. def toJson(): String

    Permalink
    Definition Classes
    StatsCollection → JsonSerializable
  60. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def timeFutureMillis[T](name: String)(f: Future[T]): Future[T]

    Permalink

    Runs the function f and logs that duration until the future is satisfied, in milliseconds, with the given name.

    Runs the function f and logs that duration until the future is satisfied, in milliseconds, with the given name.

    Definition Classes
    StatsProvider
    Annotations
    @deprecated
    Deprecated

    Use timeFutureMillisLazy instead

Inherited from StatsCollection

Inherited from JsonSerializable

Inherited from StatsProvider

Inherited from AnyRef

Inherited from Any

Ungrouped