python (3.11.7)

(root)/
lib/
python3.11/
test/
libregrtest/
__pycache__/
win_utils.cpython-311.opt-1.pyc

eddlZddlZddlZddlZddlZddlZdZdejedzzZdZ	GddZ
dS)N<ceZdZdZdZejejfdZ	e
je
je
jfdZd
dZejejejfdZdZd	S)WindowsLoadTrackerz
    This class asynchronously reads the performance counters to calculate
    the system load on Windows.  A "raw" thread is used here to prevent
    interference with the test suite's cases for the threading module.
    ctjtjg|_d|_tjdddd|_tjdddd|_tj
|jdidS)NTF)winregQueryInfoKeyHKEY_PERFORMANCE_DATA_values_load_overlappedCreateEvent_running_stopped_threadstart_new_thread_update_loadselfs N/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/libregrtest/win_utils.py__init__zWindowsLoadTracker.__init__st	F8999
#/dE4HH
#/dE4HH
 !2B;;;;;c||jdr%|||jd%||jdS)Ni)r_calculate_loadr)r_wait_signals   rrzWindowsLoadTracker._update_load&s^
eDM4((	#  """eDM4((	#	
rc||d\}}|d|d\}|d||\}}||z}	||z}
|
|	kr7|d||
\}}}
|
|z
}
|dkr|	|
z}|d||\}n|
|	k7dS|j$|jtz|dtz
zz|_dSt|jtkr|j|dSt
|jt|jz|_dS)N2L4xLLLL28xL,g?)r
LOAD_FACTOR_1lenr
NVALUEappendsum)r_query_hkey_unpackdata_	obj_start
data_start
defn_start	data_base	defn_basesizeidxoffsetcounter_offsetprocessor_queue_lengths                rrz"WindowsLoadTracker._calculate_load0sU&$$aWS$++
	")y!A!A
J
*	
*	)##!($	 B BD#vIbyy!*V!3*1'#t^*L*L'&)##
F:!*}44}9LMNDJJJ



'
'L 677777T\**S->->>DJJJrTc.|dSN)__del__)rkills  rclosezWindowsLoadTracker.closehsrc|jQ||j||jd||j||jdx|_|_dSdS)N)rr)rr_closers    rr<zWindowsLoadTracker.__del__lsp
=$GDM"""E$-$$$F4=!!!F4=!!!,00DMDMMM%$rc|jSr;)rrs r
getloadavgzWindowsLoadTracker.getloadavg{s
zrN)T)__name__
__module____qualname____doc__r_winapiWaitForSingleObjectrSetEventrr
QueryValueExrstructunpack_fromrr>CloseHandler<rCr	rrrrs
<
<
<#6(1 &2$: & 2	6?6?6?6?p1*#,	
1
1
1
1rr)rrrHmathrLr
SAMPLING_INTERVALexpr&r(rr	rr<module>rRs







HDH.3444

iiiiiiiiiir