diff rhodecode/lib/base.py @ 1622:d58e514c0a39 beta

Merge with upstream
author Liad Shani <liadff@gmail.com>
date Sat, 29 Oct 2011 19:26:43 +0200
parents 9353189b7675 6f06daeed294
children de71a4bde097
line wrap: on
line diff
--- a/rhodecode/lib/base.py	Sat Oct 29 17:03:33 2011 +0200
+++ b/rhodecode/lib/base.py	Sat Oct 29 19:26:43 2011 +0200
@@ -3,7 +3,7 @@
 Provides the BaseController class for subclassing.
 """
 import logging
-
+import time
 from pylons import config, tmpl_context as c, request, session, url
 from pylons.controllers import WSGIController
 from pylons.controllers.util import redirect
@@ -40,6 +40,7 @@
         # WSGIController.__call__ dispatches to the Controller method
         # the request is routed to. This routing information is
         # available in environ['pylons.routes_dict']
+        start = time.time()
         try:
             # putting this here makes sure that we update permissions each time
             api_key = request.GET.get('api_key')
@@ -59,6 +60,7 @@
             session.save()
             return WSGIController.__call__(self, environ, start_response)
         finally:
+            log.debug('Request time: %.3fs' % (time.time()-start))
             meta.Session.remove()