All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.touk.nussknacker.engine.util.service.EspTimer.scala Maven / Gradle / Ivy

There is a newer version: 1.18.0
Show newest version
package pl.touk.nussknacker.engine.util.service

import pl.touk.nussknacker.engine.util.metrics.{Histogram, RateMeter}

case class EspTimer(rateMeter: RateMeter, histogram: Histogram) {

  def update(nanoTimeStart: Long): Unit = {
    val delta = System.nanoTime() - nanoTimeStart
    rateMeter.mark()
    histogram.update(delta)
  }

}

object EspTimer {

  val histogramSuffix = "histogram"

  val instantRateSuffix = "instantRate"

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy