Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created November 24, 2013 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matschaffer/7624229 to your computer and use it in GitHub Desktop.
Save matschaffer/7624229 to your computer and use it in GitHub Desktop.
[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
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