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 | a0157772ad132ca449a9f5dfe6a2242af21b0c31 (patch) | |
tree | 9eac4de8f680c283a90ae3772a7a32dcfd613b90 /kamon-core/src/main/scala | |
parent | e87dfe5727191415826f34b89efbaa8b4c9fff4e (diff) | |
download | Kamon-a0157772ad132ca449a9f5dfe6a2242af21b0c31.tar.gz Kamon-a0157772ad132ca449a9f5dfe6a2242af21b0c31.tar.bz2 Kamon-a0157772ad132ca449a9f5dfe6a2242af21b0c31.zip |
! kamon-system-metrics: introducing System and JVM metrics module
Diffstat (limited to 'kamon-core/src/main/scala')
-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 { |