diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 10:26:58 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 10:26:58 +0100 |
commit | 0688c1a84caba17a600c498b158013f9867e4093 (patch) | |
tree | ad27f9490fb9f633083f99ddd0c02f6e297b4f32 /kamon-log-reporter/src/main/scala | |
parent | eee33621d5ba27229d3039f3054c306d7e569985 (diff) | |
download | Kamon-0688c1a84caba17a600c498b158013f9867e4093.tar.gz Kamon-0688c1a84caba17a600c498b158013f9867e4093.tar.bz2 Kamon-0688c1a84caba17a600c498b158013f9867e4093.zip |
= core: rename UserMetrics to SimpleMetrics.
Diffstat (limited to 'kamon-log-reporter/src/main/scala')
-rw-r--r-- | kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala b/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala index d5b07f6d..fc1f0faf 100644 --- a/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala +++ b/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala @@ -57,7 +57,7 @@ class LogReporterSubscriber extends Actor with ActorLogging { tick.metrics foreach { case (entity, snapshot) if entity.category == "actor" ⇒ logActorMetrics(entity.name, snapshot) case (entity, snapshot) if entity.category == "trace" ⇒ logTraceMetrics(entity.name, snapshot) - case (entity, snapshot) if entity.category == "user-metric" ⇒ logUserMetrics(snapshot) + case (entity, snapshot) if entity.category == "simple-metric" ⇒ logSimpleMetrics(snapshot) case (entity, snapshot) if entity.category == "system-metric" ⇒ logSystemMetrics(entity.name, snapshot) case ignoreEverythingElse ⇒ } @@ -253,59 +253,59 @@ class LogReporterSubscriber extends Actor with ActorLogging { } } - def logUserMetrics(userMetrics: EntitySnapshot): Unit = { - val histograms = userMetrics.histograms - val minMaxCounters = userMetrics.minMaxCounters - val gauges = userMetrics.gauges - val counters = userMetrics.counters + def logSimpleMetrics(simpleMetrics: EntitySnapshot): Unit = { + val histograms = simpleMetrics.histograms + val minMaxCounters = simpleMetrics.minMaxCounters + val gauges = simpleMetrics.gauges + val counters = simpleMetrics.counters if (histograms.isEmpty && counters.isEmpty && minMaxCounters.isEmpty && gauges.isEmpty) { log.info("No user metrics reported") return } - val userMetricsData = StringBuilder.newBuilder + val simpleMetricsData = StringBuilder.newBuilder - userMetricsData.append( + simpleMetricsData.append( """ |+--------------------------------------------------------------------------------------------------+ || | - || User Counters | + || Simple Counters | || ------------- | |""".stripMargin) counters.toList.sortBy(_._1.name.toLowerCase).foreach { - case (counter, snapshot) ⇒ userMetricsData.append(userCounterString(counter.name, snapshot)) + case (counter, snapshot) ⇒ simpleMetricsData.append(userCounterString(counter.name, snapshot)) } - userMetricsData.append( + simpleMetricsData.append( """|| | || | - || User Histograms | + || Simple Histograms | || --------------- | |""".stripMargin) histograms.foreach { case (histogram, snapshot) ⇒ - userMetricsData.append("| %-40s |\n".format(histogram.name)) - userMetricsData.append(compactHistogramView(snapshot)) - userMetricsData.append("\n| |\n") + simpleMetricsData.append("| %-40s |\n".format(histogram.name)) + simpleMetricsData.append(compactHistogramView(snapshot)) + simpleMetricsData.append("\n| |\n") } - userMetricsData.append( + simpleMetricsData.append( """|| | - || User MinMaxCounters | + || Simple MinMaxCounters | || ------------------- | |""".stripMargin) minMaxCounters.foreach { case (minMaxCounter, snapshot) ⇒ - userMetricsData.append("| %-40s |\n".format(minMaxCounter.name)) - userMetricsData.append(simpleHistogramView(snapshot)) - userMetricsData.append("\n| |\n") + simpleMetricsData.append("| %-40s |\n".format(minMaxCounter.name)) + simpleMetricsData.append(simpleHistogramView(snapshot)) + simpleMetricsData.append("\n| |\n") } - userMetricsData.append( + simpleMetricsData.append( """|| | || User Gauges | || ----------- | @@ -314,17 +314,17 @@ class LogReporterSubscriber extends Actor with ActorLogging { gauges.foreach { case (gauge, snapshot) ⇒ - userMetricsData.append("| %-40s |\n".format(gauge.name)) - userMetricsData.append(simpleHistogramView(snapshot)) - userMetricsData.append("\n| |\n") + simpleMetricsData.append("| %-40s |\n".format(gauge.name)) + simpleMetricsData.append(simpleHistogramView(snapshot)) + simpleMetricsData.append("\n| |\n") } - userMetricsData.append( + simpleMetricsData.append( """|| | |+--------------------------------------------------------------------------------------------------+""" .stripMargin) - log.info(userMetricsData.toString()) + log.info(simpleMetricsData.toString()) } def userCounterString(counterName: String, snapshot: Counter.Snapshot): String = { |