B
fP @ s d Z yddlZddlmZ W n ek
r8 d\ZZY nX ddlZddlZddlZddlZddlm Z ddl
mZ edZ
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 ZeeZdd 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|ddddd |jd
ddd|d
dd |jdddd|ddd dS )z&Register commandline options.
Nz--profile-sortZstoreprofile_sortZNOSE_PROFILE_SORTZ
cumulativeZSORTz"Set sort order for profiler output)actiondestdefaultmetavarhelpz--profile-stats-fileprofile_stats_fileFILEZNOSE_PROFILE_STATS_FILEz;Profiler stats file; default is a new temp file on each run)r r r
r r z--profile-restrictappendprofile_restrictZRESTRICTZNOSE_PROFILE_RESTRICTz?Restrict profiler output. See help for pstats.Stats for details) availabler optionsZ
add_optionget)selfparserenv r B/opt/alt/python37/lib/python3.7/site-packages/nose/plugins/prof.pyr ! s"