summaryrefslogtreecommitdiff
path: root/cherrypy/test/benchmark.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2006-08-25 21:25:56 +0000
committerRobert Brewer <fumanchu@aminus.org>2006-08-25 21:25:56 +0000
commita4b0f89d3adff5ce7931d81dc259fed0e9f091f5 (patch)
treefda90c2e4664674aa3d0724beed3b543a824c8ff /cherrypy/test/benchmark.py
parent31bfe036ad8ee2d7222c67deb7b2019a878c239c (diff)
downloadcherrypy-git-a4b0f89d3adff5ce7931d81dc259fed0e9f091f5.tar.gz
More (final?) config overhaul work:
1. Removed cherrypy.config.get! Instead, you should directly inspect cherrypy.request, response, server, etc. Note that request.config.get still works fine. 2. a) cherrypy.log is now an instance of LogManager. It's still callable, but now is the object you inspect instead of calling config.get("log*"). b) cherrypy.log_access is now cherrypy.log.access. 3. All threads should now have access to default Request and Response objects, not just the main thread. 4. deadlock.timeout is now request.timeout. 5. Renamed config.py to _cpconfig.py; cherrypy.config is now an instance of _cpconfig.Config. I still need to decide what to do about log_config (removed for now).
Diffstat (limited to 'cherrypy/test/benchmark.py')
-rw-r--r--cherrypy/test/benchmark.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cherrypy/test/benchmark.py b/cherrypy/test/benchmark.py
index a8186651..b12bfc5d 100644
--- a/cherrypy/test/benchmark.py
+++ b/cherrypy/test/benchmark.py
@@ -65,7 +65,7 @@ cherrypy.config.update({
'server.socket_host': 'localhost',
'server.socket_port': 8080,
'server.max_request_header_size': 0,
- 'request.max_body_size': 0,
+ 'server.max_request_body_size': 0,
})
appconf = {
@@ -180,7 +180,7 @@ Finished 1000 requests
self.concurrency = concurrency
def args(self):
- port = cherrypy.config.get('server.socket_port')
+ port = cherrypy.server.socket_port
assert self.concurrency > 0
assert self.requests > 0
return ("-k -n %s -c %s http://localhost:%s%s" %
@@ -240,17 +240,17 @@ def print_report(rows):
def run_standard_benchmarks():
print
print ("Client Thread Report (1000 requests, 14 byte response body, "
- "%s server threads):" % cherrypy.config.get('server.thread_pool'))
+ "%s server threads):" % cherrypy.server.thread_pool)
print_report(thread_report())
print
print ("Client Thread Report (1000 requests, 14 bytes via staticdir, "
- "%s server threads):" % cherrypy.config.get('server.thread_pool'))
+ "%s server threads):" % cherrypy.server.thread_pool)
print_report(thread_report("%s/static/index.html" % SCRIPT_NAME))
print
print ("Size Report (1000 requests, 50 client threads, "
- "%s server threads):" % cherrypy.config.get('server.thread_pool'))
+ "%s server threads):" % cherrypy.server.thread_pool)
print_report(size_report())