Package cherrypy :: Package test :: Module benchmark
[hide private]
[frames] | no frames]

Module benchmark

source code

CherryPy Benchmark Tool

Usage:
    benchmark.py [options]

--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 54583 (with the builtin _cpmodpy)
--modpython:   run tests via apache on 54583 (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.

Classes [hide private]
  Root
  NullRequest
A null HTTP request class, returning 200 and an empty body.
  NullResponse
  ABSession
A session of 'ab', the Apache HTTP server benchmarking tool.
Functions [hide private]
 
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
 
print_report(rows) source code
 
run_standard_benchmarks() source code
 
startup_modpython(req=None)
Start the CherryPy app server in 'serverless' mode (for modpython/WSGI).
source code
 
run_modpython(use_wsgi=False) source code
Variables [hide private]
  curdir = '/opt/build/cherrypy3-3.5.0/cherrypy/test'
  AB_PATH = ''
  APACHE_PATH = 'apache'
  SCRIPT_NAME = '/cpbench/users/rdelon/apps/blog'
  size_cache = {}
  appconf = {'/static': {'tools.staticdir.dir': 'static', 'tools...
  app = cherrypy._cptree.Application(<cherrypy.test.benchmark.Ro...
  safe_threads = (25, 50, 100, 200, 400)
  __package__ = 'cherrypy.test'
Variables Details [hide private]

appconf

Value:
{'/static': {'tools.staticdir.dir': 'static',
             'tools.staticdir.on': True,
             'tools.staticdir.root': '/opt/build/cherrypy3-3.5.0/cherr\
ypy/test'}}

app

Value:
cherrypy._cptree.Application(<cherrypy.test.benchmark.Root instance at\
 0x7f185640c1b8>, '/cpbench/users/rdelon/apps/blog')