관리-도구
편집 파일: prof.cpython-37.pyc
B �fP� � @ s� d Z yddlZddlmZ W n ek r8 d\ZZY nX ddlZddlZddlZddlZddlm Z ddl mZ e�d�Z G dd � d e �ZdS ) 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 @ s` e Zd ZdZdZdZdd� Zdd� Zee�Zdd � Z d d� Z dd � Zdd� Zdd� Z dd� ZdS )�ProfilezC Use this plugin to run tests using the hotshot profiler. NFc C st | � � sdS t�| ||� |jddd|�dd�ddd � |jd ddd|�d �dd� |jdddd|�d�dd� dS )z&Register commandline options. Nz--profile-sort�store�profile_sortZNOSE_PROFILE_SORTZ cumulativeZSORTz"Set sort order for profiler output)�action�dest�default�metavar�helpz--profile-stats-file�profile_stats_fileZFILEZNOSE_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_restrictZRESTRICTZNOSE_PROFILE_RESTRICTz?Restrict profiler output. See help for pstats.Stats for details)� availabler �options� add_option�get)�self�parser�env� r �B/opt/alt/python37/lib/python3.7/site-packages/nose/plugins/prof.pyr ! s"