Class

com.twitter.finagle.stats

InMemoryStatsReceiver

Related Doc: package stats

Permalink

class InMemoryStatsReceiver extends StatsReceiver

In-memory stats receiver for testing.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. InMemoryStatsReceiver
  2. StatsReceiver
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InMemoryStatsReceiver()

    Permalink

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*)(f: ⇒ Float): Gauge

    Permalink

    Add the function f as a gauge with the given name.

    Add the function f as a gauge with the given name.

    The returned gauge value is only weakly referenced by the StatsReceiver, and if garbage collected will eventually cease to be a part of this measurement: thus, it needs to be retained by the caller. Or put another way, the measurement is only guaranteed to exist as long as there exists a strong reference to the returned gauge and typically should be stored in a member variable.

    Measurements under the same name are added together.

    Definition Classes
    InMemoryStatsReceiverStatsReceiver
    See also

    java.lang.ref.WeakReference

    StatsReceiver.provideGauge when there is not a good location to store the returned gauge that can give the desired lifecycle.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clear(): Unit

    Permalink

    Clears all registered counters, gauges and stats.

    Clears all registered counters, gauges and stats.

    Note

    this is not atomic. If new metrics are added while this method is executing, those metrics may remain.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def counter(name: String*): ReadableCounter

    Permalink

    Get a counter with the given name.

    Get a counter with the given name.

    Definition Classes
    InMemoryStatsReceiverStatsReceiver
  9. def counter0(name: String): Counter

    Permalink

    Get a counter with the given name.

    Get a counter with the given name.

    This method is a convenience for Java programs, but is no longer needed because StatsReceivers.counter is usable from java.

    Definition Classes
    StatsReceiver
  10. val counters: HashMap[Seq[String], Int] with SynchronizedMap[Seq[String], Int]

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. val gauges: WeakHashMap[Seq[String], () ⇒ Float] with SynchronizedMap[Seq[String], () ⇒ Float]

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  18. def isNull: Boolean

    Permalink

    Accurately indicates if this is a NullStatsReceiver.

    Accurately indicates if this is a NullStatsReceiver. Because equality is not forwarded via scala.Proxy, this is helpful to check for a NullStatsReceiver.

    Definition Classes
    StatsReceiver
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  22. def print(p: PrintStream): Unit

    Permalink
  23. def provideGauge(name: String*)(f: ⇒ Float): Unit

    Permalink

    Register a function f as a gauge with the given name that has a lifecycle with no end.

    Register a function f as a gauge with the given name that has a lifecycle with no end.

    This measurement exists in perpetuity.

    Measurements under the same name are added together.

    Definition Classes
    StatsReceiver
    See also

    StatsReceiver.addGauge if you can properly control the lifecycle of the returned gauge.

  24. val repr: InMemoryStatsReceiver

    Permalink

    Specifies the representative receiver.

    Specifies the representative receiver. This is in order to expose an object we can use for comparison so that global stats are only reported once per receiver.

    Definition Classes
    InMemoryStatsReceiverStatsReceiver
  25. def scope(namespace: String): StatsReceiver

    Permalink

    Prepend namespace to the names of the returned StatsReceiver.

    Prepend namespace to the names of the returned StatsReceiver.

    For example:

    statsReceiver.scope("client").counter("adds")
    statsReceiver.scope("client").scope("backend").counter("adds")

    will generate counters named /client/adds and /client/backend/adds.

    Definition Classes
    StatsReceiver
  26. def scopeSuffix(suffix: String): StatsReceiver

    Permalink

    Prepend a suffix value to the next scope.

    Prepend a suffix value to the next scope.

    For example:

    statsReceiver.scopeSuffix("toto").scope("client").counter("adds")

    will generate a counter named /client/toto/adds.

    Definition Classes
    StatsReceiver
  27. def stat(name: String*): ReadableStat

    Permalink

    Get a stat with the given name.

    Get a stat with the given name.

    Definition Classes
    InMemoryStatsReceiverStatsReceiver
  28. def stat0(name: String): Stat

    Permalink

    Get a stat with the given name.

    Get a stat with the given name. This method is a convenience for Java programs, but is no longer needed because StatsReceivers.counter is usable from java.

    Definition Classes
    StatsReceiver
  29. val stats: HashMap[Seq[String], Seq[Float]] with SynchronizedMap[Seq[String], Seq[Float]]

    Permalink
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

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

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

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

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

Deprecated Value Members

  1. def time[T](name: String*)(f: ⇒ T): T

    Permalink

    Time a given function in milliseconds.

    Time a given function in milliseconds.

    Definition Classes
    StatsReceiver
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.time instead

  2. def time[T](unit: TimeUnit, name: String*)(f: ⇒ T): T

    Permalink

    Time a given function using the given TimeUnit.

    Time a given function using the given TimeUnit.

    Definition Classes
    StatsReceiver
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.time instead

  3. def time[T](unit: TimeUnit, stat: Stat)(f: ⇒ T): T

    Permalink

    Time a given function using the given TimeUnit.

    Time a given function using the given TimeUnit.

    Definition Classes
    StatsReceiver
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.time instead

  4. def timeFuture[T](name: String*)(f: ⇒ Future[T]): Future[T]

    Permalink

    Time a given future in milliseconds.

    Time a given future in milliseconds.

    Definition Classes
    StatsReceiver
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.timeFuture instead

  5. def timeFuture[T](unit: TimeUnit, name: String*)(f: ⇒ Future[T]): Future[T]

    Permalink

    Time a given future using the given TimeUnit.

    Time a given future using the given TimeUnit.

    Definition Classes
    StatsReceiver
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.timeFuture instead

  6. def timeFuture[T](unit: TimeUnit, stat: Stat)(f: ⇒ Future[T]): Future[T]

    Permalink

    Time a given future using the given TimeUnit.

    Time a given future using the given TimeUnit.

    Definition Classes
    StatsReceiver
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-2-22) Use Stat.timeFuture instead

Inherited from StatsReceiver

Inherited from AnyRef

Inherited from Any

Ungrouped