summaryrefslogtreecommitdiff
path: root/cherrypy/lib/profiler.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2005-06-25 20:37:39 +0000
committerRobert Brewer <fumanchu@aminus.org>2005-06-25 20:37:39 +0000
commit931880f918dc3d056640a521b2cab4ff7f0894e7 (patch)
treef73ee8133eba3d4540dd531e13ade80aa5d2e101 /cherrypy/lib/profiler.py
parent95b1f7e9c51fde72758e60bd69c0875719ab2117 (diff)
downloadcherrypy-git-931880f918dc3d056640a521b2cab4ff7f0894e7.tar.gz
Implements ticket #195.
1. cpg module removed, all content moved into cherrypy.__init__. 2. Removed some circular imports in sessionfilter by moving sessionfilter.sessionfilter and _sessionTypes into sessionfilter.__init__. 3. renamed _cpconfig to "config". 4. renamed _cpserver to "server". 5. renamed cperror to _cperror; cherrypy.__init__ now imports * from _cperror.
Diffstat (limited to 'cherrypy/lib/profiler.py')
-rw-r--r--cherrypy/lib/profiler.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/cherrypy/lib/profiler.py b/cherrypy/lib/profiler.py
index 0274fa18..0f56395f 100644
--- a/cherrypy/lib/profiler.py
+++ b/cherrypy/lib/profiler.py
@@ -45,7 +45,7 @@ You can profile any of your pages as follows:
def _index(self):
return "Hello, world!"
- cpg.root = Root()
+ cherrypy.root = Root()
CherryPy developers
@@ -130,22 +130,22 @@ class Profiler(object):
menu.exposed = True
def report(self, filename):
- from cherrypy import cpg
- cpg.response.headerMap['Content-Type'] = 'text/plain'
+ import cherrypy
+ cherrypy.response.headerMap['Content-Type'] = 'text/plain'
return self.stats(filename)
report.exposed = True
def serve(path=None, port=8080):
- from cherrypy import cpg
- cpg.root = Profiler(path)
- cpg.config.update({'global': {'server.serverPort': port,
- 'server.threadPool': 10,
- 'server.environment': "production",
- 'session.storageType': "ram",
- }
- })
- cpg.server.start()
+ import cherrypy
+ cherrypy.root = Profiler(path)
+ cherrypy.config.update({'global': {'server.serverPort': port,
+ 'server.threadPool': 10,
+ 'server.environment': "production",
+ 'session.storageType': "ram",
+ }
+ })
+ cherrypy.server.start()
if __name__ == "__main__":