Permalink
Browse files

WatermarkPool: add a pool size gauge

  • Loading branch information...
1 parent 1fc8ad7 commit 7b87b1b5818aac4cdd6771b612c4bd2b63ea86eb @mariusae mariusae committed Mar 18, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 finagle-core/src/main/scala/com/twitter/finagle/pool/WatermarkPool.scala
View
3 finagle-core/src/main/scala/com/twitter/finagle/pool/WatermarkPool.scala
@@ -27,7 +27,8 @@ class WatermarkPool[Req, Rep](
private[this] var numServices = 0
private[this] var isOpen = true
- private[this] val waitersStat = statsReceiver.addGauge("pool_waiters")(waiters.size)
+ private[this] val waitersStat = statsReceiver.addGauge("pool_waiters") { waiters.size }
+ private[this] val sizeStat = statsReceiver.addGauge("pool_size") { numServices }
private[this] class ServiceWrapper(underlying: Service[Req, Rep])
extends Service[Req, Rep]

0 comments on commit 7b87b1b

Please sign in to comment.