Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.9/site-packages/mercurial/__pycache__/ |
Upload File : |
a �+�b�� � @ s� d Z ddlmZmZmZ ddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl Z ddlZddlmZ ddlmZmZ ejZejZg d�Zh d�Zd d � ZG dd� de�Ze� ZG d d� de�ZG dd� de�Zdd� Ze �� Zdd� Z dd� Z!da"dDdd�Z#dd� Z$dd� Z%dd � Z&dEd!d"�Z'ed#d$� �Z(G d%d&� d&e�Z)G d'd(� d(�Z*dFd*d+�Z+d,d-� Z,d.d/� Z-dGd0d1�Z.dHd3d4�Z/dId5d6�Z0i Z1d7d8� Z2d9d:� Z3dJd=d>�Z4d?d@� Z5dKdAdB�Z6e7dCk�r�e�8e6� � dS )La� statprof is intended to be a fairly simple statistical profiler for python. It was ported directly from a statistical profiler for guile, also named statprof, available from guile-lib [0]. [0] http://wingolog.org/software/guile-lib/statprof/ To start profiling, call statprof.start(): >>> start() Then run whatever it is that you want to profile, for example: >>> import test.pystone; test.pystone.pystones() Then stop the profiling and print out the results: >>> stop() >>> display() % cumulative self time seconds seconds name 26.72 1.40 0.37 pystone.py:79:Proc0 13.79 0.56 0.19 pystone.py:133:Proc1 13.79 0.19 0.19 pystone.py:208:Proc8 10.34 0.16 0.14 pystone.py:229:Func2 6.90 0.10 0.10 pystone.py:45:__init__ 4.31 0.16 0.06 pystone.py:53:copy ... All of the numerical data is statistically approximate. In the following column descriptions, and in all of statprof, "time" refers to execution time (both user and system), not wall clock time. % time The percent of the time spent inside the procedure itself (not counting children). cumulative seconds The total number of seconds spent in the procedure, including children. self seconds The total number of seconds spent in the procedure itself (not counting children). name The name of the procedure. By default statprof keeps the data collected from previous runs. If you want to clear the collected data, call reset(): >>> reset() reset() can also be used to change the sampling frequency from the default of 1000 Hz. For example, to tell statprof to sample 50 times a second: >>> reset(50) This means that statprof will sample the call stack after every 1/50 of a second of user + system time spent running on behalf of the python process. When your process is idle (for example, blocking in a read(), as is the case at the listener), the clock does not advance. For this reason statprof is not currently not suitable for profiling io-bound operations. The profiler uses the hash of the code object itself to identify the procedures, so it won't confuse different procedures with the same name. They will show up as two different rows in the output. Right now the profiler is quite simplistic. I cannot provide call-graphs or other higher level information. What you see in the table is pretty much all there is. Patches are welcome :-) Threading --------- Because signals only get delivered to the main thread in Python, statprof only profiles the main thread. However because the time reporting function uses per-process timers, the results can be significantly off if other threads' work patterns are not similar to the main thread's work patterns. � )�absolute_import�division�print_functionN� )�open)�encoding�pycompat)s starts stops resets displays profile> zextensions.py:closurezdispatch.py:_dispatchzpager.py:pagecmdzdispatch.py:<lambda>z util.py:checkzdispatch.py:_runcommandzevolve.py:warnobserrorszdispatch.py:checkargszdispatch.py:_runcatchzhg.py:<module>zdispatch.py:dispatchzdispatch.py:runcommandzdispatch.py:runzcolor.py:colorcmdc C s t �� } | d | d | d fS )Nr r � )�os�times)r � r �8/usr/lib64/python3.9/site-packages/mercurial/statprof.py�clock� s r c @ s<