Created
November 24, 2013 07:05
-
-
Save matschaffer/7624229 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Compiling 1 Scala source to /Users/matschaffer/code/graphitedemos/demo-app/target/scala-2.10/classes... | |
[error] /Users/matschaffer/code/graphitedemos/demo-app/src/main/scala/com/devopscasts/demo/DemoServlet.scala:19: type mismatch; | |
[error] found : Long | |
[error] required: Int | |
[error] case requestStart: java.lang.Long => stats.recordExecutionTime("latency", requestEnd - requestStart) | |
[error] ^ | |
[error] one error found | |
[error] (compile:compile) Compilation failed | |
[error] Total time: 1 s, completed Nov 23, 2013 11:04:23 PM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before() { | |
contentType = "text/html" | |
request.setAttribute("requestStart", System.currentTimeMillis) | |
} | |
after() { | |
val requestEnd = System.currentTimeMillis | |
request.getAttribute("requestStart") match { | |
case requestStart: java.lang.Long => stats.recordExecutionTime("latency", requestEnd - requestStart) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment