MCPcopy
hub / github.com/cherrypy/cherrypy / run_modpython

Function run_modpython

cherrypy/test/benchmark.py:328–356  ·  view source on GitHub ↗
(use_wsgi=False)

Source from the content-addressed store, hash-verified

326
327
328def run_modpython(use_wsgi=False):
329 print('Starting mod_python...')
330 pyopts = []
331
332 # Pass the null and ab=path options through Apache
333 if '--null' in opts:
334 pyopts.append(('nullreq', ''))
335
336 if '--ab' in opts:
337 pyopts.append(('ab', opts['--ab']))
338
339 s = _cpmodpy.ModPythonServer
340 if use_wsgi:
341 pyopts.append(('wsgi.application', 'cherrypy::tree'))
342 pyopts.append(
343 ('wsgi.startup', 'cherrypy.test.benchmark::startup_modpython'))
344 handler = 'modpython_gateway::handler'
345 s = s(port=54583, opts=pyopts,
346 apache_path=APACHE_PATH, handler=handler)
347 else:
348 pyopts.append(
349 ('cherrypy.setup', 'cherrypy.test.benchmark::startup_modpython'))
350 s = s(port=54583, opts=pyopts, apache_path=APACHE_PATH)
351
352 try:
353 s.start()
354 run()
355 finally:
356 s.stop()
357
358
359if __name__ == '__main__':

Callers 1

benchmark.pyFile · 0.85

Calls 3

runFunction · 0.70
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…