Package org.apache.cassandra.metrics
Class ThreadPoolMetrics
java.lang.Object
org.apache.cassandra.metrics.ThreadPoolMetrics
Metrics for
ThreadPoolExecutor.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringfinal com.codahale.metrics.Gauge<Integer>Number of active tasks.static final Stringfinal com.codahale.metrics.Gauge<Long>Number of completed tasks.final com.codahale.metrics.CounterNumber of tasks currently blocked, waiting to be accepted by the executor (because all threads are busy and the backing queue is full).static final Stringstatic final Stringstatic final Stringfinal com.codahale.metrics.Gauge<Integer>Maximum number of threads before it will start queuing tasksfinal com.codahale.metrics.Gauge<Integer>Maximum number of tasks queued before a task get blockedstatic final Stringfinal com.codahale.metrics.Gauge<Long>For how long the oldest task in the queue was queuedfinal Stringstatic final Stringfinal com.codahale.metrics.Gauge<Integer>Number of tasks waiting to be executed.final Stringstatic final Stringfinal com.codahale.metrics.CounterNumber of tasks that had blocked before being accepted (or rejected). -
Constructor Summary
ConstructorsConstructorDescriptionThreadPoolMetrics(ResizableThreadPool executor, String path, String poolName) Create metrics for given ThreadPoolExecutor. -
Method Summary
-
Field Details
-
ACTIVE_TASKS
- See Also:
-
PENDING_TASKS
- See Also:
-
COMPLETED_TASKS
- See Also:
-
CURRENTLY_BLOCKED_TASKS
- See Also:
-
TOTAL_BLOCKED_TASKS
- See Also:
-
MAX_POOL_SIZE
- See Also:
-
MAX_TASKS_QUEUED
- See Also:
-
OLDEST_TASK_QUEUE_TIME
- See Also:
-
activeTasks
Number of active tasks. -
pendingTasks
Number of tasks waiting to be executed. -
completedTasks
Number of completed tasks. -
currentBlocked
public final com.codahale.metrics.Counter currentBlockedNumber 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 totalBlockedNumber of tasks that had blocked before being accepted (or rejected). -
maxPoolSize
Maximum number of threads before it will start queuing tasks -
oldestTaskQueueTime
For how long the oldest task in the queue was queued -
maxTasksQueued
Maximum number of tasks queued before a task get blocked -
path
-
poolName
-
-
Constructor Details
-
ThreadPoolMetrics
Create metrics for given ThreadPoolExecutor.- Parameters:
executor- Thread poolpath- Type of thread poolpoolName- Name of thread pool to identify metrics
-
-
Method Details
-
register
-
release
public void release()
-