object InstrumentedSource
- Alphabetic
- By Inheritance
- InstrumentedSource
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final class InstrumentedBoundedSourceQueue[T] extends BoundedSourceQueue[T]
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bufferedSource[T, U](original: Source[T, U], counter: Counter, size: Int): Source[T, U]
Adds a buffer to the output of the original source, and adds a Counter metric for buffer size.
Adds a buffer to the output of the original source, and adds a Counter metric for buffer size.
Good for detecting bottlenecks and speed difference between consumer and producer. In case producer is faster, this buffer should be mostly empty. In case producer is slower, this buffer should be mostly full.
- original
the original source which will be instrumented
- counter
the counter to track the actual size of the buffer
- size
the maximum size of the buffer. In case of a bottleneck in producer this will be mostly full, so careful estimation needed to prevent excessive memory pressure
- returns
the instrumentes source
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def queue[T](bufferSize: Int, capacityCounter: Counter, lengthCounter: Counter, delayTimer: Timer)(implicit materializer: Materializer): Source[T, BoundedSourceQueue[T]]
Returns a
Source
that can be fed via the materialized queue.Returns a
Source
that can be fed via the materialized queue.The queue length counter can at most be eventually consistent due to the counter increment and decrement operation being scheduled separately and possibly not in the same order as the actual enqueuing and dequeueing of items.
For this reason, you may also read values on the saturation counter which are negative or exceed
bufferSize
.Note that the fact that the count is decremented in a second operator means that its buffering will likely skew the measurements to be greater than the actual value, rather than the other way around.
We track the queue capacity as a counter as we may want to aggregate the metrics for multiple individual queues of the same kind and we want to be able to decrease the capacity when the queue gets completed.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated