Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cherrypy/test/__pycache__/benchmark.cpython-39.pyc
Ðазад
a v�h1 � @ sL d Z ddlZddlZddlZddlZddlZddlZddlmZmZ ddl m Z ej�e� � ej�e��ZdadZdZg d�Zi ZG d d � d �Zdd� ZG d d� d�ZG dd� d�ZG dd� d�ZdZejdv r�dZed efdd�Zd8dd�Zdd� Zdd � Z d9d!d"�Z!d:d$d%�Z"e#d&k�rHe� g d'�Z$z(e�ej%d(d� de$�\Z&Z'e(e&�Z)W n( ej*�y| e+e � e�,d)� Y n0 d*e)v �r�e+e � e�,d� d+e)v �r�e)d+ ad,e)v �r�d-d.� Z-nd/d.� Z-e+d0� G d1d2� d2e.�Z/e/� e_0e�� Z1d3e)v �re"� nFd4e)v �re"d5d6� n0d7e)v �r2eej2_3eej2_4ej5�6e-� ej5�7� dS );a� 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. � N)�_cperror�_cpmodpy)�httputil� �apachez/cpbench/users/rdelon/apps/blog)� ABSession�Root�print_report�run_standard_benchmarks�safe_threads�size_report� thread_reportc @ s6 e Zd Zejdd� �Zejdd� �Zejdd� �ZdS )r c C s dS )Na| <html> <head> <title>CherryPy Benchmark</title> </head> <body> <ul> <li><a href="hello">Hello, world! (14 byte dynamic)</a></li> <li><a href="static/index.html">Static file (14 bytes static)</a></li> <li><form action="sizer">Response of length: <input type='text' name='size' value='10' /></form> </li> </ul> </body> </html>� ��selfr r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cherrypy/test/benchmark.py�index3 s z Root.indexc C s dS )NzHello, world r r r r r �helloD s z Root.helloc C s, t �|d �}|d u r(dt|� t |<