Package com.helix.core.executor
Class VirtualThreadExecutorMetrics
java.lang.Object
com.helix.core.executor.ExecutorMetrics
com.helix.core.executor.VirtualThreadExecutorMetrics
Extended metrics tracking execution counts, timing, active virtual thread tasks, and timeouts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the number of currently active virtual-thread tasks.longReturns the total count of executions that exceeded their deadline timeout.voidrecordTimeout(long durationNanos) Records an execution that failed due to a deadline timeout.voidDecrements the count of currently executing tasks.voidIncrements the count of currently executing tasks.Methods inherited from class com.helix.core.executor.ExecutorMetrics
getAverageExecutionTimeNanos, getFailedExecutions, getSuccessfulExecutions, getTotalExecutions, getTotalExecutionTimeNanos, recordExecution
-
Constructor Details
-
VirtualThreadExecutorMetrics
public VirtualThreadExecutorMetrics()
-
-
Method Details
-
recordTimeout
public void recordTimeout(long durationNanos) Records an execution that failed due to a deadline timeout.- Parameters:
durationNanos- elapsed time before timeout
-
taskStarted
public void taskStarted()Increments the count of currently executing tasks. -
taskFinished
public void taskFinished()Decrements the count of currently executing tasks. -
getTimedOutExecutions
public long getTimedOutExecutions()Returns the total count of executions that exceeded their deadline timeout.- Returns:
- timeout count
-
getActiveTasks
public long getActiveTasks()Returns the number of currently active virtual-thread tasks.- Returns:
- active task count
-