diff options
Diffstat (limited to 'kamon-core/src/main')
-rw-r--r-- | kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala | 4 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/metrics/instruments/counter/MinMaxCounter.scala | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala b/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala index 7766b3a1..9ef43bbe 100644 --- a/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala +++ b/kamon-core/src/main/scala/akka/instrumentation/ActorMessagePassingTracing.scala @@ -24,7 +24,7 @@ import kamon.trace._ import kamon.metrics.{ ActorMetrics, Metrics } import kamon.Kamon import kamon.metrics.ActorMetrics.ActorMetricRecorder -import kamon.metrics.instruments.counter.{ Counter, MinMaxCounter } +import kamon.metrics.instruments.counter.MinMaxCounter @Aspect class BehaviourInvokeTracing { @@ -114,7 +114,7 @@ class BehaviourInvokeTracing { trait ActorCellMetrics { var metricIdentity: ActorMetrics = _ var actorMetricsRecorder: Option[ActorMetricRecorder] = _ - val queueSize: Counter = MinMaxCounter() + val queueSize = MinMaxCounter() } @Aspect diff --git a/kamon-core/src/main/scala/kamon/metrics/instruments/counter/MinMaxCounter.scala b/kamon-core/src/main/scala/kamon/metrics/instruments/counter/MinMaxCounter.scala index 052c7bcd..ed83f4bc 100644 --- a/kamon-core/src/main/scala/kamon/metrics/instruments/counter/MinMaxCounter.scala +++ b/kamon-core/src/main/scala/kamon/metrics/instruments/counter/MinMaxCounter.scala @@ -19,13 +19,7 @@ import java.lang.Math._ import jsr166e.LongMaxUpdater import kamon.util.PaddedAtomicLong -sealed trait Counter { - def increment(value: Long = 1L): Unit - def decrement(value: Long = 1L): Unit - def collect(): (Long, Long, Long) -} - -class MinMaxCounter extends Counter { +class MinMaxCounter { private val min = new LongMaxUpdater private val max = new LongMaxUpdater private val sum = new PaddedAtomicLong @@ -53,5 +47,5 @@ class MinMaxCounter extends Counter { } object MinMaxCounter { - def apply(): Counter = new MinMaxCounter() + def apply() = new MinMaxCounter() } |