SHARE
TWEET

Untitled

a guest Oct 21st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trait LatencyRecorderActor extends Actor with StrictLogging {
  2.  val actorName: String = this.getClass.getSimpleName
  3.  
  4.  abstract override def receive: Receive = {
  5.    case recordableMessage: RecordableMessage =>
  6.      Monitor.record("time-in-mailbox", actorName, recordableMessage.messageName,
  7.         recordableMessage.dispatchTime)
  8.      val start = System.currentTimeMillis()
  9.      super.receive(recordableMessage)
  10.      Monitor.record("processing-time", actorName, recordableMessage.messageName, start)
  11.    case message => super.receive(message)
  12.  }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top