aboutsummaryrefslogtreecommitdiff
path: root/kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala
diff options
context:
space:
mode:
authorDiego <diegolparra@gmail.com>2014-12-27 17:09:38 -0300
committerIvan Topolnjak <ivantopo@gmail.com>2014-12-28 18:12:27 +0100
commit58ec8bbe6a5192dc9cba9752324e1f793da156f2 (patch)
tree03e38722c5da10ef91997835f417a57f142ad6ec /kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala
parenta7c2289a31f841c4abf360db197c355e766fb3e0 (diff)
downloadKamon-58ec8bbe6a5192dc9cba9752324e1f793da156f2.tar.gz
Kamon-58ec8bbe6a5192dc9cba9752324e1f793da156f2.tar.bz2
Kamon-58ec8bbe6a5192dc9cba9752324e1f793da156f2.zip
+ system-metrics: fix #135 and includes the following new metrics:
** DiskMetrics ** NonHeapMetrics ** LoadAverageMetrics ** ThreadMetrics ** ClassLoadingMetrics and closes #131
Diffstat (limited to 'kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala')
-rw-r--r--kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala11
1 files changed, 5 insertions, 6 deletions
diff --git a/kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala b/kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala
index bc5fc724..5aa679c9 100644
--- a/kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala
+++ b/kamon-system-metrics/src/main/scala/kamon/metrics/GCMetrics.scala
@@ -20,7 +20,7 @@ import java.lang.management.GarbageCollectorMXBean
import akka.actor.ActorSystem
import com.typesafe.config.Config
import kamon.metric._
-import kamon.metric.instrument.{ Gauge, Histogram }
+import kamon.metric.instrument.Histogram
case class GCMetrics(name: String) extends MetricGroupIdentity {
val category = GCMetrics
@@ -32,7 +32,7 @@ object GCMetrics extends MetricGroupCategory {
case object CollectionCount extends MetricIdentity { val name = "collection-count" }
case object CollectionTime extends MetricIdentity { val name = "collection-time" }
- case class GCMetricRecorder(count: Gauge, time: Gauge)
+ case class GCMetricRecorder(count: Histogram, time: Histogram)
extends MetricGroupRecorder {
def collect(context: CollectionContext): MetricGroupSnapshot = {
@@ -71,8 +71,7 @@ case class GCMetricGroupFactory(gc: GarbageCollectorMXBean) extends MetricGroupF
val timeConfig = settings.getConfig("time")
new GCMetricRecorder(
- Gauge.fromConfig(countConfig, system)(() ⇒ gc.getCollectionCount),
- Gauge.fromConfig(timeConfig, system, Scale.Milli)(() ⇒ gc.getCollectionTime))
+ Histogram.fromConfig(countConfig),
+ Histogram.fromConfig(timeConfig))
}
-}
-
+} \ No newline at end of file