Changeset - 6f06daeed294
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-10-26 20:13:20
marcin@python-works.com
Added Request time tracking
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/base.py
Show inline comments
 
@@ -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
 
@@ -39,6 +39,7 @@ class BaseController(WSGIController):
 
        # 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')
 
@@ -51,6 +52,7 @@ class BaseController(WSGIController):
 
            session.save()
 
            return WSGIController.__call__(self, environ, start_response)
 
        finally:
 
            log.debug('Request time: %.3fs' % (time.time()-start))
 
            meta.Session.remove()
 

	
 

	
0 comments (0 inline, 0 general)