Skip to content
Browse files

[debug] server_private: debug response computation time

  • Loading branch information...
1 parent cd9e22c commit 983938ac636697cc80d3d3407c91df0dde847789 @Aqua-Ye Aqua-Ye committed Feb 17, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 stdlib/core/web/server/server_private.opa
View
8 stdlib/core/web/server/server_private.opa
@@ -341,6 +341,14 @@ Server_private = {{
/* Make dispatcher */
url_dispatcher = make_dispatcher(service)
+ url_dispatcher(x) =
+ #<Ifstatic:BENCH_SERVER>
+ print_t(t) = Log.notice("Server", "responded in {t}s")
+ CoreProfiler.instrument(1, print_t){->url_dispatcher(x)}
+ #<Else>
+ url_dispatcher(x)
+ #<End>
+
dispatcher =
// CAUTION : The url_dispatcher called is delayed (via push) by complete_dispatcher for one important reason :
// It introduces a new execution task in the scheduler.

0 comments on commit 983938a

Please sign in to comment.
Something went wrong with that request. Please try again.