diff options
author | Michael Moss <michael.moss@gmail.com> | 2016-09-13 18:23:41 -0400 |
---|---|---|
committer | Diego Parra <diegolparra@gmail.com> | 2016-09-14 00:23:41 +0200 |
commit | be07f2cded403b5939d5b7c0817444dd9b3f9e4e (patch) | |
tree | e18aaf969dc84229aca35f7f885627b0aec7ab06 /kamon-core/src/main/scala/kamon/util/executors | |
parent | bd06f44e4092147ab525f8ab2b7e7370e634331a (diff) | |
download | Kamon-be07f2cded403b5939d5b7c0817444dd9b3f9e4e.tar.gz Kamon-be07f2cded403b5939d5b7c0817444dd9b3f9e4e.tar.bz2 Kamon-be07f2cded403b5939d5b7c0817444dd9b3f9e4e.zip |
= core, log-reporter: added getQueuedSubmissionCount #390 (#392)
Diffstat (limited to 'kamon-core/src/main/scala/kamon/util/executors')
-rw-r--r-- | kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala b/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala index 465205b2..82655e9a 100644 --- a/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala +++ b/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala @@ -30,6 +30,7 @@ object ForkJoinPools { def getActiveThreadCount(fjp: T): Long def getRunningThreadCount(fjp: T): Long def getQueuedTaskCount(fjp: T): Long + def getQueuedSubmissionCount(fjp: T): Long } implicit object ScalaForkJoin extends ForkJoinMetrics[ForkJoinPool] { @@ -38,6 +39,7 @@ object ForkJoinPools { def getRunningThreadCount(fjp: ForkJoinPool) = fjp.getActiveThreadCount.toLong def getActiveThreadCount(fjp: ForkJoinPool) = fjp.getRunningThreadCount.toLong def getQueuedTaskCount(fjp: ForkJoinPool) = fjp.getQueuedTaskCount + def getQueuedSubmissionCount(fjp: ForkJoinPool) = fjp.getQueuedSubmissionCount } @@ -47,6 +49,7 @@ object ForkJoinPools { def getRunningThreadCount(fjp: JavaForkJoinPool) = fjp.getActiveThreadCount.toLong def getActiveThreadCount(fjp: JavaForkJoinPool) = fjp.getRunningThreadCount.toLong def getQueuedTaskCount(fjp: JavaForkJoinPool) = fjp.getQueuedTaskCount + def getQueuedSubmissionCount(fjp: JavaForkJoinPool) = fjp.getQueuedSubmissionCount } } @@ -57,6 +60,7 @@ abstract class ForkJoinPoolMetrics(instrumentFactory: InstrumentFactory) extends def activeThreads: Gauge def runningThreads: Gauge def queuedTaskCount: Gauge + def queuedSubmissionCount: Gauge } object ForkJoinPoolMetrics { @@ -72,6 +76,7 @@ object ForkJoinPoolMetrics { val activeThreads = gauge("active-threads", forkJoinMetrics.getActiveThreadCount(fjp)) val runningThreads = gauge("running-threads", forkJoinMetrics.getRunningThreadCount(fjp)) val queuedTaskCount = gauge("queued-task-count", forkJoinMetrics.getQueuedTaskCount(fjp)) + val queuedSubmissionCount = gauge("queued-submission-count", forkJoinMetrics.getQueuedSubmissionCount(fjp)) } } } |