Module benchmark
source code
CherryPy Benchmark Tool
Usage:
benchmark.py --null --notests --help --cpmodpy --modpython --ab=path --apache=path
--null: use a null Request object (to bench the HTTP server only)
--notests: start the server but do not run the tests; this allows
you to check the tested pages with a browser
--help: show this help message
--cpmodpy: run tests via apache on 8080 (with the builtin _cpmodpy)
--modpython: run tests via apache on 8080 (with modpython_gateway)
--ab=path: Use the ab script/executable at 'path' (see below)
--apache=path: Use the apache script/exe at 'path' (see below)
To run the benchmarks, the Apache Benchmark tool "ab" must either be on
your system path, or specified via the --ab=path option.
To run the modpython tests, the "apache" executable or script must be
on your system path, or provided via the --apache=path option. On some
platforms, "apache" may be called "apachectl" or "apache2ctl"--create
a symlink to them if needed.
|
|
thread_report(path='/cpbench/users/rdelon/apps/blog/hello',
concurrency=(25, 50, 100, 200, 400)) |
source code
|
|
|
|
size_report(sizes=(10, 100, 1000, 10000, 100000, 100000000),
concurrency=50) |
source code
|
|
|
|
|
|
|
|
|
|
startup_modpython(req=None)
Start the CherryPy app server in 'serverless' mode (for
modpython/WSGI). |
source code
|
|
|
|
|
|
|
curdir = '/home/orion/oss/python/cherrypy/CherryPy-3.0.3/cherr...
|
|
|
AB_PATH = ''
|
|
|
APACHE_PATH = 'apache'
|
|
|
SCRIPT_NAME = '/cpbench/users/rdelon/apps/blog'
|
|
|
size_cache = {}
|
|
|
appconf = {'/static': {'tools.staticdir.dir': 'static', 'tools...
|
|
|
app = cherrypy.tree.mount(Root(), SCRIPT_NAME, appconf)
|
|
|
safe_threads = (25, 50, 100, 200, 400)
|
Imports:
getopt,
os,
re,
sys,
time,
traceback,
cherrypy,
_cperror,
_cpmodpy,
http
curdir
- Value:
'/home/orion/oss/python/cherrypy/CherryPy-3.0.3/cherrypy/test'
|
|
appconf
- Value:
{'/static': {'tools.staticdir.dir': 'static',
'tools.staticdir.on': True,
'tools.staticdir.root': '/home/orion/oss/python/cherrypy/
CherryPy-3.0.3/cherrypy/test'}}
|
|