diff options
author | Diego Parra <diegolparra@gmail.com> | 2013-08-23 15:39:47 -0300 |
---|---|---|
committer | Diego Parra <diegolparra@gmail.com> | 2013-08-23 15:39:47 -0300 |
commit | db59a9e51703731da85a3451201202f3c05ef8bf (patch) | |
tree | 84e571c4e6fe00b882ba8f15e8351aa0d6cef854 /kamon-dashboard/src | |
parent | 068ae04a1cdbce98ad099c620ab78a66003ecd36 (diff) | |
download | Kamon-db59a9e51703731da85a3451201202f3c05ef8bf.tar.gz Kamon-db59a9e51703731da85a3451201202f3c05ef8bf.tar.bz2 Kamon-db59a9e51703731da85a3451201202f3c05ef8bf.zip |
Fix TotalMessages
Diffstat (limited to 'kamon-dashboard/src')
-rw-r--r-- | kamon-dashboard/src/main/scala/kamon/dashboard/DashboardService.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kamon-dashboard/src/main/scala/kamon/dashboard/DashboardService.scala b/kamon-dashboard/src/main/scala/kamon/dashboard/DashboardService.scala index 75dcf36c..e2eb7890 100644 --- a/kamon-dashboard/src/main/scala/kamon/dashboard/DashboardService.scala +++ b/kamon-dashboard/src/main/scala/kamon/dashboard/DashboardService.scala @@ -48,8 +48,8 @@ trait DashboardPages extends HttpService { trait DashboardMetricsApi extends HttpService with SprayJsonSupport{ - case class TimerDataHolder(name:String, count:Long, percentile99:Double) - case class TotalMessages(messages:Long, actors:Long, data:List[TimerDataHolder]) + case class TimerDataHolder(name:String, count:Double, percentile99:Double) + case class TotalMessages(messages:Double, actors:Long, data:Seq[TimerDataHolder]) case class DispatcherMetricCollectorHolder(name:String, activeThreadCount: Double, poolSize: Double, queueSize:Double) case class ActorSystemMetricsHolder(actorSystem:String, dispatchers:Map[String, DispatcherMetricCollectorHolder]) @@ -75,13 +75,13 @@ trait DashboardMetricsApi extends HttpService with SprayJsonSupport{ def actorSystemMetrics = actorSystemNames.flatMap(name => actorSystem(name)) .map(system => ActorSystemMetricsHolder(system.actorSystemName, system.dispatchers.map { case(name, metricCollector) => (name -> DispatcherMetricCollectorHolder(name, metricCollector.activeThreadCount.snapshot.median, metricCollector.poolSize.snapshot.median, metricCollector.queueSize.snapshot.median))}.toMap)) - val withTotalMessages = (dataHolders: List[TimerDataHolder]) => { + val withTotalMessages = (dataHolders: Seq[TimerDataHolder]) => { val numberOfMessages = dataHolders.map(_.count).sum - new TotalMessages(numberOfMessages,dataHolders.size, dataHolders) + new TotalMessages(numberOfMessages, dataHolders.size, dataHolders) } - def timerMetrics = registry.getTimers(metricFilter).asScala.map{ case(name, timer) => TimerDataHolder(name, timer.getCount, timer.getSnapshot.get99thPercentile())}.toList + def timerMetrics = registry.getTimers(metricFilter).asScala.map{ case(name, timer) => TimerDataHolder(name, timer.getMeanRate, timer.getSnapshot.get99thPercentile)}.toVector val dashboardMetricsApi = pathPrefix("metrics") { |