XylotrechusZ
�
���g� � � � d Z ddlZddlmZ ddlZddlZddlZddlZddlm Z ddl
mZ ej d� Z
G d� d e � Zy# e$ r d\ ZZY �Fw xY w)
a/ This plugin will run tests using the hotshot profiler, which is part
of the standard library. To turn it on, use the ``--with-profile`` option
or set the NOSE_WITH_PROFILE environment variable. Profiler output can be
controlled with the ``--profile-sort`` and ``--profile-restrict`` options,
and the profiler output file may be changed with ``--profile-stats-file``.
See the `hotshot documentation`_ in the standard library documentation for
more details on the various output options.
.. _hotshot documentation: http://docs.python.org/library/hotshot.html
� N)�stats)NN)�Plugin)�tolistznose.pluginsc �X � e Zd ZdZdZdZd� Zd� Z ee� Zd� Z d� Z
d� Zd � Zd
� Z
d� Zy)�ProfilezC
Use this plugin to run tests using the hotshot profiler.
NFc �: � | j � syt j | ||� |j ddd|j dd� dd� � |j d
ddd|j d
� d�� |j dddd|j d� d�� y)z&Register commandline options.
Nz--profile-sort�store�profile_sort�NOSE_PROFILE_SORT�
cumulative�SORTz"Set sort order for profiler output)�action�dest�default�metavar�helpz--profile-stats-file�profile_stats_file�FILE�NOSE_PROFILE_STATS_FILEz;Profiler stats file; default is a new temp file on each run)r r r r r z--profile-restrict�append�profile_restrict�RESTRICT�NOSE_PROFILE_RESTRICTz?Restrict profiler output. See help for pstats.Stats for details)� availabler �options�
add_option�get)�self�parser�envs �@/opt/hc_python/lib/python3.12/site-packages/nose/plugins/prof.pyr zProfile.options! s� � � �~�~������t�V�S�)����*�7��"%�'�'�*=�|�"L�"(�C� � E� ���0��3�"(�"%�'�'�*C�"D� 2� � 3� ���.�x�1�",�"%�'�'�*A�"B� 5� � 6� c � � t d uS �N)�hotshot)�clss r! r zProfile.available8 s
� ��d�"�"r"