| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python315/Lib/test/libregrtest/__pycache__/ |
Upload File : |
R
>lqj� c � � ] PH s ] PHs] PHs] PHs] PHs] PHs]s]\O \]<* 2 * s]s Q Q2 s
P! )� c �
` � \ sQ s]s n QsQ s\O \O 1Q ks
\O \O \O 1Q ksQ Q ks\O \O$ \O 1Q ksQ sQsU sP! )
�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.
c �D � PU m PU m [ O [ O 2 , U m PU m [ O PP P
P2 U m [ O PP P
P2 U m [ O U O Q- 2 P! )N� )�_running�_stopped�winreg�QueryInfoKey�HKEY_PERFORMANCE_DATA�_values�_load�_overlapped�CreateEvent�_thread�start_new_thread�_update_load��selfs &�/C:\Python315\\Lib\test\libregrtest\win_utils.py�__init__�WindowsLoadTracker.__init__ s| � ���
���
� ���F�8�8�9������
�#�/�/��d�E�4�H��
�#�/�/��d�E�4�H��
�� � ��!2�!2�B��;� c � � U U O Q 2 % c U O 2 J+ U U O 2 P! )�� )r �_calculate_loadr )r �_wait�_signals &&&r r �WindowsLoadTracker._update_load* s- � �
�D�M�M�4�(�(�� � �"���
�
�r c �F � U UQ 2 v qEU QU]2 v oU QVF2 v qxVg* o Vh* o
V�6 c2 U QVJ2 v q�o
V�*
o
U],6X f J# V�* oU QVN2 v oLP! U O d8 U O [ * UQ[ *
* * U m P! [ U O 2 [ 6 c U O O U2 P! [
U O 2 [ U O 2 * U m P! )�2�L�4xLL�LL28xLg �?)r �
LOAD_FACTOR_1�lenr �NVALUE�append�sum)r �_query�_hkey�_unpack�data�_� obj_start�
data_start�
defn_start� data_base� defn_base�size�idx�offset�counter_offset�processor_queue_lengths &&&& r r �"WindowsLoadTracker._calculate_load4 s� � � ���$��� �S�$��+�
� � ")���!A��
��*� ��*� ��#� !(��$� B��D�v���I��b�y�!*�!3��*1�#�t�*L�'�&��� �:�:�!��*�*�}�4�4��}�9L�M�N�D�J�
����
��
'��L�L��� 6�7��T�\�\�*�S����->�>�D�Jr c �( � U O 2 P! �N)�__del__)r �kills &&r �close�WindowsLoadTracker.closel s � �����r c �� � U O dZ U U O 2 U U O P2 U U O 2 U U O 2 P9U m U m P! P! r9 )r r )r r �_closer s &&&&r r: �WindowsLoadTracker.__del__p sS � �
�=�=�$��D�M�M�"��$�-�-��$��4�=�=�!��4�=�=�!�,0�0�D�M�D�M� %r c � � U O ! r9 )r r s &r �
getloadavg�WindowsLoadTracker.getloadavg s � ��z�z�r )r r r r )T)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r �_winapi�WaitForSingleObjectr
�SetEventr r �QueryValueExr
�struct�unpack_fromr r<