Mercurial > kallithea
diff rhodecode/lib/base.py @ 1601:6f06daeed294 beta
Added Request time tracking
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 26 Oct 2011 20:13:20 +0200 |
parents | 04027bdb876c |
children | d58e514c0a39 |
line wrap: on
line diff
--- a/rhodecode/lib/base.py Wed Oct 26 13:37:03 2011 +0200 +++ b/rhodecode/lib/base.py Wed Oct 26 20:13:20 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 @@ -39,6 +39,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') @@ -51,6 +52,7 @@ session.save() return WSGIController.__call__(self, environ, start_response) finally: + log.debug('Request time: %.3fs' % (time.time()-start)) meta.Session.remove()