Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Add back a gauge that should not have been removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Raghavendra Prabhu committed Mar 30, 2012
1 parent 8b02f75 commit dc549c8
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -51,9 +51,13 @@ extends AsyncDatabase {
// returns an ExecutorService, which unfortunately doesn't give us as much visibility into stats as
// the ThreadPoolExecutor, so we create one ourselves. We use a LinkedBlockingQueue for memory efficiency
// since maxWaiters can be very high (configuration default is Int.MaxValue, i.e. unbounded).
private val executor = new ThreadPoolExecutor(workPoolSize, workPoolSize, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue[Runnable](maxWaiters),
new DaemonThreadFactory("asyncWorkPool-" + dbStr));
private val executor = {
val e = new ThreadPoolExecutor(workPoolSize, workPoolSize, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue[Runnable](maxWaiters),
new DaemonThreadFactory("asyncWorkPool-" + dbStr));
stats.addGauge("db-async-waiters-" + dbStr)(e.getQueue.size)
e
}
private val workPool = FuturePool(executor)
private val openTimeout = database.openTimeout

Expand Down

0 comments on commit dc549c8

Please sign in to comment.