diff options
author | Diego <diegolparra@gmail.com> | 2014-06-24 23:35:14 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-07-21 17:13:28 -0300 |
commit | 5c141733ad39cf2730cf34dc8f3f4a82f0c1b516 (patch) | |
tree | ab2830795cacae80aa232e41ed224534572ba678 /kamon-core/src/main/scala/kamon/metric | |
parent | a96f6dadd5f77271672215e731b842ce785954f4 (diff) | |
download | Kamon-5c141733ad39cf2730cf34dc8f3f4a82f0c1b516.tar.gz Kamon-5c141733ad39cf2730cf34dc8f3f4a82f0c1b516.tar.bz2 Kamon-5c141733ad39cf2730cf34dc8f3f4a82f0c1b516.zip |
! kamon-system-metrics: introducing System and JVM metrics module
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metric')
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/instrument/Gauge.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kamon-core/src/main/scala/kamon/metric/instrument/Gauge.scala b/kamon-core/src/main/scala/kamon/metric/instrument/Gauge.scala index 1efff2bc..efd7d78f 100644 --- a/kamon-core/src/main/scala/kamon/metric/instrument/Gauge.scala +++ b/kamon-core/src/main/scala/kamon/metric/instrument/Gauge.scala @@ -44,14 +44,18 @@ object Gauge { fromConfig(config, system)(currentValueCollector) } - def fromConfig(config: Config, system: ActorSystem)(currentValueCollector: CurrentValueCollector): Gauge = { + def fromConfig(config: Config, system: ActorSystem, scale: Scale)(currentValueCollector: CurrentValueCollector): Gauge = { import scala.concurrent.duration._ val highest = config.getLong("highest-trackable-value") val significantDigits = config.getInt("significant-value-digits") val refreshInterval = config.getDuration("refresh-interval", TimeUnit.MILLISECONDS) - Gauge(Histogram.Precision(significantDigits), highest, Scale.Unit, refreshInterval.millis, system)(currentValueCollector) + Gauge(Histogram.Precision(significantDigits), highest, scale, refreshInterval.millis, system)(currentValueCollector) + } + + def fromConfig(config: Config, system: ActorSystem)(currentValueCollector: CurrentValueCollector): Gauge = { + fromConfig(config, system, Scale.Unit)(currentValueCollector) } implicit def functionZeroAsCurrentValueCollector(f: () ⇒ Long): CurrentValueCollector = new CurrentValueCollector { |