aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/util
diff options
context:
space:
mode:
authorDiego <diegolparra@gmail.com>2016-12-04 15:37:51 -0300
committerDiego <diegolparra@gmail.com>2016-12-04 15:37:51 -0300
commit56039ef037d42cb817d0bc6d5a5891bc87e633c3 (patch)
tree711d36b49d69f7321ea75172d9d4969e318d7afe /kamon-core/src/main/scala/kamon/util
parente02d137ab960676cb89ff597bc33915f8b83a4d2 (diff)
downloadKamon-56039ef037d42cb817d0bc6d5a5891bc87e633c3.tar.gz
Kamon-56039ef037d42cb817d0bc6d5a5891bc87e633c3.tar.bz2
Kamon-56039ef037d42cb817d0bc6d5a5891bc87e633c3.zip
wip
Diffstat (limited to 'kamon-core/src/main/scala/kamon/util')
-rw-r--r--kamon-core/src/main/scala/kamon/util/ConfigTools.scala2
-rw-r--r--kamon-core/src/main/scala/kamon/util/FastDispatch.scala2
-rw-r--r--kamon-core/src/main/scala/kamon/util/LazyActorRef.scala2
-rw-r--r--kamon-core/src/main/scala/kamon/util/MapMerge.scala2
-rw-r--r--kamon-core/src/main/scala/kamon/util/NeedToScale.scala4
-rw-r--r--kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala6
-rw-r--r--kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala10
-rw-r--r--kamon-core/src/main/scala/kamon/util/http/HttpServerMetrics.scala2
-rw-r--r--kamon-core/src/main/scala/kamon/util/logger/LazyLogger.scala4
9 files changed, 17 insertions, 17 deletions
diff --git a/kamon-core/src/main/scala/kamon/util/ConfigTools.scala b/kamon-core/src/main/scala/kamon/util/ConfigTools.scala
index d0665764..cbf530e4 100644
--- a/kamon-core/src/main/scala/kamon/util/ConfigTools.scala
+++ b/kamon-core/src/main/scala/kamon/util/ConfigTools.scala
@@ -22,7 +22,7 @@ import com.typesafe.config.Config
import scala.concurrent.duration.FiniteDuration
-import kamon.metric.instrument.{ Memory, Time }
+import kamon.metric.instrument.{Memory, Time}
object ConfigTools {
implicit class Syntax(val config: Config) extends AnyVal {
diff --git a/kamon-core/src/main/scala/kamon/util/FastDispatch.scala b/kamon-core/src/main/scala/kamon/util/FastDispatch.scala
index d2748847..7a94aefc 100644
--- a/kamon-core/src/main/scala/kamon/util/FastDispatch.scala
+++ b/kamon-core/src/main/scala/kamon/util/FastDispatch.scala
@@ -18,7 +18,7 @@ package kamon.util
import akka.actor.ActorRef
-import scala.concurrent.{ ExecutionContext, Future }
+import scala.concurrent.{ExecutionContext, Future}
/**
* Extension for Future[ActorRef]. Try to dispatch a message to a Future[ActorRef] in the same thread if it has already
diff --git a/kamon-core/src/main/scala/kamon/util/LazyActorRef.scala b/kamon-core/src/main/scala/kamon/util/LazyActorRef.scala
index e2fb747a..a07abea6 100644
--- a/kamon-core/src/main/scala/kamon/util/LazyActorRef.scala
+++ b/kamon-core/src/main/scala/kamon/util/LazyActorRef.scala
@@ -19,7 +19,7 @@ package kamon.util
import java.util
import java.util.concurrent.ConcurrentLinkedQueue
-import akka.actor.{ Actor, ActorRef }
+import akka.actor.{Actor, ActorRef}
import org.HdrHistogram.WriterReaderPhaser
import scala.annotation.tailrec
diff --git a/kamon-core/src/main/scala/kamon/util/MapMerge.scala b/kamon-core/src/main/scala/kamon/util/MapMerge.scala
index 8573358b..6fc6fb15 100644
--- a/kamon-core/src/main/scala/kamon/util/MapMerge.scala
+++ b/kamon-core/src/main/scala/kamon/util/MapMerge.scala
@@ -28,7 +28,7 @@ object MapMerge {
map.foreach {
case (key, value) ⇒
val mergedValue = that.get(key).map(v ⇒ valueMerge(value, v)).getOrElse(value)
- merged += key -> mergedValue
+ merged += key → mergedValue
}
that.foreach {
diff --git a/kamon-core/src/main/scala/kamon/util/NeedToScale.scala b/kamon-core/src/main/scala/kamon/util/NeedToScale.scala
index 19e1ae06..1397050f 100644
--- a/kamon-core/src/main/scala/kamon/util/NeedToScale.scala
+++ b/kamon-core/src/main/scala/kamon/util/NeedToScale.scala
@@ -17,7 +17,7 @@
package kamon.util
import com.typesafe.config.Config
-import kamon.metric.instrument.{ Memory, Time }
+import kamon.metric.instrument.{Memory, Time}
import kamon.util.ConfigTools._
object NeedToScale {
@@ -30,7 +30,7 @@ object NeedToScale {
val scaleMemoryTo: Option[Memory] =
if (config.hasPath(MemoryUnits)) Some(config.memory(MemoryUnits)) else None
- if (scaleTimeTo.isDefined || scaleMemoryTo.isDefined) Some(scaleTimeTo -> scaleMemoryTo)
+ if (scaleTimeTo.isDefined || scaleMemoryTo.isDefined) Some(scaleTimeTo → scaleMemoryTo)
else None
}
}
diff --git a/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala b/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala
index 82655e9a..732e189e 100644
--- a/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala
+++ b/kamon-core/src/main/scala/kamon/util/executors/ExecutorMetricRecorder.scala
@@ -16,9 +16,9 @@
package kamon.util.executors
-import kamon.metric.{ EntityRecorderFactory, GenericEntityRecorder }
-import kamon.metric.instrument.{ Gauge, MinMaxCounter, DifferentialValueCollector, InstrumentFactory }
-import java.util.concurrent.{ ForkJoinPool ⇒ JavaForkJoinPool, ThreadPoolExecutor }
+import kamon.metric.{EntityRecorderFactory, GenericEntityRecorder}
+import kamon.metric.instrument.{Gauge, MinMaxCounter, DifferentialValueCollector, InstrumentFactory}
+import java.util.concurrent.{ForkJoinPool ⇒ JavaForkJoinPool, ThreadPoolExecutor}
import kamon.util.executors.ForkJoinPools.ForkJoinMetrics
import scala.concurrent.forkjoin.ForkJoinPool
diff --git a/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala b/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala
index 98d2ea0c..60612beb 100644
--- a/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala
+++ b/kamon-core/src/main/scala/kamon/util/executors/ExecutorServiceMetrics.scala
@@ -16,7 +16,7 @@
package kamon.util.executors
-import java.util.concurrent.{ ExecutorService, ForkJoinPool ⇒ JavaForkJoinPool, ThreadPoolExecutor }
+import java.util.concurrent.{ExecutorService, ForkJoinPool ⇒ JavaForkJoinPool, ThreadPoolExecutor}
import kamon.Kamon
import kamon.metric.Entity
@@ -49,7 +49,7 @@ object ExecutorServiceMetrics {
* @param tags The tags associated to the [[ThreadPoolExecutor]]
*/
@inline private def registerThreadPool(name: String, threadPool: ThreadPoolExecutor, tags: Map[String, String]): Entity = {
- val threadPoolEntity = Entity(name, Category, tags + ("executor-type" -> "thread-pool-executor"))
+ val threadPoolEntity = Entity(name, Category, tags + ("executor-type" → "thread-pool-executor"))
Kamon.metrics.entity(ThreadPoolExecutorMetrics.factory(threadPool, Category), threadPoolEntity)
threadPoolEntity
}
@@ -63,7 +63,7 @@ object ExecutorServiceMetrics {
* @param tags The tags associated to the [[ForkJoinPool]]
*/
@inline private def registerScalaForkJoin(name: String, forkJoinPool: ForkJoinPool, tags: Map[String, String]): Entity = {
- val forkJoinEntity = Entity(name, Category, tags + ("executor-type" -> "fork-join-pool"))
+ val forkJoinEntity = Entity(name, Category, tags + ("executor-type" → "fork-join-pool"))
Kamon.metrics.entity(ForkJoinPoolMetrics.factory(forkJoinPool, Category), forkJoinEntity)
forkJoinEntity
}
@@ -77,7 +77,7 @@ object ExecutorServiceMetrics {
* @param tags The tags associated to the [[JavaForkJoinPool]]
*/
@inline private def registerJavaForkJoin(name: String, forkJoinPool: JavaForkJoinPool, tags: Map[String, String]): Entity = {
- val forkJoinEntity = Entity(name, Category, tags + ("executor-type" -> "fork-join-pool"))
+ val forkJoinEntity = Entity(name, Category, tags + ("executor-type" → "fork-join-pool"))
Kamon.metrics.entity(ForkJoinPoolMetrics.factory(forkJoinPool, Category), forkJoinEntity)
forkJoinEntity
}
@@ -97,7 +97,7 @@ object ExecutorServiceMetrics {
case delegatedExecutor: ExecutorService if delegatedExecutor.getClass.isAssignableFrom(DelegatedExecutor) ⇒ registerDelegatedExecutor(name, delegatedExecutor, tags)
case delegatedScheduledExecutor: ExecutorService if delegatedScheduledExecutor.getClass.isAssignableFrom(DelegateScheduled) ⇒ registerDelegatedExecutor(name, delegatedScheduledExecutor, tags)
case finalizableDelegatedExecutor: ExecutorService if finalizableDelegatedExecutor.getClass.isAssignableFrom(FinalizableDelegated) ⇒ registerDelegatedExecutor(name, finalizableDelegatedExecutor, tags)
- case other ⇒ throw new NotSupportedException(s"The ExecutorService $name is not supported.")
+ case other ⇒ throw NotSupportedException(s"The ExecutorService $name is not supported.")
}
//Java variant
diff --git a/kamon-core/src/main/scala/kamon/util/http/HttpServerMetrics.scala b/kamon-core/src/main/scala/kamon/util/http/HttpServerMetrics.scala
index 81e8fb8b..929fef4f 100644
--- a/kamon-core/src/main/scala/kamon/util/http/HttpServerMetrics.scala
+++ b/kamon-core/src/main/scala/kamon/util/http/HttpServerMetrics.scala
@@ -16,7 +16,7 @@
package kamon.util.http
-import kamon.metric.{ EntityRecorderFactory, GenericEntityRecorder }
+import kamon.metric.{EntityRecorderFactory, GenericEntityRecorder}
import kamon.metric.instrument.InstrumentFactory
/**
diff --git a/kamon-core/src/main/scala/kamon/util/logger/LazyLogger.scala b/kamon-core/src/main/scala/kamon/util/logger/LazyLogger.scala
index c70c316d..11be7bbe 100644
--- a/kamon-core/src/main/scala/kamon/util/logger/LazyLogger.scala
+++ b/kamon-core/src/main/scala/kamon/util/logger/LazyLogger.scala
@@ -15,7 +15,7 @@
package kamon.util.logger
-import org.slf4j.{ Logger ⇒ SLF4JLogger }
+import org.slf4j.{Logger ⇒ SLF4JLogger}
class LazyLogger(val logger: SLF4JLogger) {
@@ -41,7 +41,7 @@ class LazyLogger(val logger: SLF4JLogger) {
}
object LazyLogger {
- import scala.reflect.{ classTag, ClassTag }
+ import scala.reflect.{classTag, ClassTag}
def apply(name: String): LazyLogger = new LazyLogger(org.slf4j.LoggerFactory.getLogger(name))
def apply(cls: Class[_]): LazyLogger = apply(cls.getName)