diff options
author | Diego <diegolparra@gmail.com> | 2014-05-07 22:45:34 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-05-07 22:45:34 -0300 |
commit | 1704a8515a73a806e594e980bfeee25ce36d3bae (patch) | |
tree | 5cf9d3f7da0a63e1ee232c30692e6d0e2a2c1521 /kamon-core/src/main/scala | |
parent | f08cb7395f1b18cd473d876fa862bfdebe61788c (diff) | |
download | Kamon-1704a8515a73a806e594e980bfeee25ce36d3bae.tar.gz Kamon-1704a8515a73a806e594e980bfeee25ce36d3bae.tar.bz2 Kamon-1704a8515a73a806e594e980bfeee25ce36d3bae.zip |
= core: fixed ActorMetricsSpec
Diffstat (limited to 'kamon-core/src/main/scala')
-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() } |