Mercurial > kallithea
changeset 1355:bfc529377cdc beta
added simple profiling middleware controlled by .ini file flag
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 03 Jun 2011 13:45:10 +0200 |
parents | ed309b1fbaa4 |
children | eec4defdf2b8 |
files | development.ini production.ini rhodecode/config/deployment.ini_tmpl rhodecode/config/middleware.py |
diffstat | 4 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/development.ini Fri Jun 03 13:44:10 2011 +0200 +++ b/development.ini Fri Jun 03 13:45:10 2011 +0200 @@ -7,6 +7,7 @@ [DEFAULT] debug = true +pdebug = false ################################################################################ ## Uncomment and replace with the address which should receive ## ## any error reports after application crash ##
--- a/production.ini Fri Jun 03 13:44:10 2011 +0200 +++ b/production.ini Fri Jun 03 13:45:10 2011 +0200 @@ -7,6 +7,7 @@ [DEFAULT] debug = true +pdebug = false ################################################################################ ## Uncomment and replace with the address which should receive ## ## any error reports after application crash ##
--- a/rhodecode/config/deployment.ini_tmpl Fri Jun 03 13:44:10 2011 +0200 +++ b/rhodecode/config/deployment.ini_tmpl Fri Jun 03 13:45:10 2011 +0200 @@ -7,6 +7,7 @@ [DEFAULT] debug = true +pdebug = false ################################################################################ ## Uncomment and replace with the address which should receive ## ## any error reports after application crash ##
--- a/rhodecode/config/middleware.py Fri Jun 03 13:44:10 2011 +0200 +++ b/rhodecode/config/middleware.py Fri Jun 03 13:45:10 2011 +0200 @@ -47,6 +47,9 @@ app = SessionMiddleware(app, config) # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) + if asbool(config['pdebug']): + from rhodecode.lib.profiler import ProfilingMiddleware + app = ProfilingMiddleware(app) app = SimpleHg(app, config) app = SimpleGit(app, config)