Class ThreadPoolMetrics

java.lang.Object
org.apache.cassandra.metrics.ThreadPoolMetrics

public class ThreadPoolMetrics extends Object
Metrics for ThreadPoolExecutor.
  • Field Details

    • ACTIVE_TASKS

      public static final String ACTIVE_TASKS
      See Also:
    • PENDING_TASKS

      public static final String PENDING_TASKS
      See Also:
    • COMPLETED_TASKS

      public static final String COMPLETED_TASKS
      See Also:
    • CURRENTLY_BLOCKED_TASKS

      public static final String CURRENTLY_BLOCKED_TASKS
      See Also:
    • TOTAL_BLOCKED_TASKS

      public static final String TOTAL_BLOCKED_TASKS
      See Also:
    • MAX_POOL_SIZE

      public static final String MAX_POOL_SIZE
      See Also:
    • MAX_TASKS_QUEUED

      public static final String MAX_TASKS_QUEUED
      See Also:
    • OLDEST_TASK_QUEUE_TIME

      public static final String OLDEST_TASK_QUEUE_TIME
      See Also:
    • activeTasks

      public final com.codahale.metrics.Gauge<Integer> activeTasks
      Number of active tasks.
    • pendingTasks

      public final com.codahale.metrics.Gauge<Integer> pendingTasks
      Number of tasks waiting to be executed.
    • completedTasks

      public final com.codahale.metrics.Gauge<Long> completedTasks
      Number of completed tasks.
    • currentBlocked

      public final com.codahale.metrics.Counter currentBlocked
      Number of tasks currently blocked, waiting to be accepted by the executor (because all threads are busy and the backing queue is full).
    • totalBlocked

      public final com.codahale.metrics.Counter totalBlocked
      Number of tasks that had blocked before being accepted (or rejected).
    • maxPoolSize

      public final com.codahale.metrics.Gauge<Integer> maxPoolSize
      Maximum number of threads before it will start queuing tasks
    • oldestTaskQueueTime

      public final com.codahale.metrics.Gauge<Long> oldestTaskQueueTime
      For how long the oldest task in the queue was queued
    • maxTasksQueued

      public final com.codahale.metrics.Gauge<Integer> maxTasksQueued
      Maximum number of tasks queued before a task get blocked
    • path

      public final String path
    • poolName

      public final String poolName
  • Constructor Details

    • ThreadPoolMetrics

      public ThreadPoolMetrics(ResizableThreadPool executor, String path, String poolName)
      Create metrics for given ThreadPoolExecutor.
      Parameters:
      executor - Thread pool
      path - Type of thread pool
      poolName - Name of thread pool to identify metrics
  • Method Details