Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1098

Show
Ignore:
Timestamp:
05/07/06 17:21:50
Author:
fumanchu
Message:

Moved the profiler setup into _cprequest (so it's all in one place now).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpengine.py

    r1096 r1098  
    88import cherrypy 
    99from cherrypy import _cprequest 
    10 from cherrypy.lib import autoreload, profiler, cptools 
     10from cherrypy.lib import autoreload, cptools 
    1111 
    1212# Use a flag to indicate the state of the application engine. 
     
    4747            from cherrypy.lib import covercp 
    4848            covercp.start() 
    49          
    50         # Set up the profiler if requested. 
    51         if conf("profiling.on", False): 
    52             ppath = conf("profiling.path", "") 
    53             cherrypy.profiler = profiler.Profiler(ppath) 
    54         else: 
    55             cherrypy.profiler = None 
    5649         
    5750        # Autoreload. Note that, if we're not starting our own HTTP server, 
  • trunk/cherrypy/_cprequest.py

    r1096 r1098  
    88import cherrypy 
    99from cherrypy import _cperror, _cputil, _cpcgifs, tools 
    10 from cherrypy.lib import cptools, httptools 
     10from cherrypy.lib import cptools, httptools, profiler 
    1111 
    1212 
     
    6969        self.simple_cookie = Cookie.SimpleCookie() 
    7070         
    71         if cherrypy.profiler: 
     71        # Set up the profiler if requested. 
     72        conf = cherrypy.config.get 
     73        if conf("profiling.on", False): 
     74            p = getattr(cherrypy, "profiler", None) 
     75            if p is None: 
     76                ppath = conf("profiling.path", "") 
     77                p = cherrypy.profiler = profiler.Profiler(ppath) 
    7278            cherrypy.profiler.run(self._run) 
    7379        else: 

Hosted by WebFaction

Log in as guest/cpguest to create tickets