%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/test/libregrtest/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/test/libregrtest/__pycache__/logger.cpython-312.pyc

�

���f�
��h�ddlZddlZddlmZddlmZddlmZddlm	Z	erddl
mZGd�d	�Zy)
�N)�
MS_WINDOWS�)�TestResults)�RunTests)�
print_warning)�WindowsLoadTrackerc�x�eZdZdededefd�Zddeddfd�Zdedzfd	�Z	d
e
deddfd�Zd
eddfd�Z
dd�Zdd�Zy)�Logger�results�quiet�pgoc��tj�|_d|_d|_d|_||_||_||_y)N��)	�time�perf_counter�
start_time�test_count_text�test_count_width�win_load_tracker�_results�_quiet�_pgo)�selfrrr
s    �./usr/lib/python3.12/test/libregrtest/logger.py�__init__zLogger.__init__s?���+�+�-���!��� !���;?���%,��
�!�����	��line�returnNc��|}|j�}|�	d|d�d|��}tj�|jz
}t	t|�d�\}}t	|d�\}}d|||fz}|�d|��}|r|dd}t
|d��y)	Nz
load avg: z.2f� �<z%d:%02d:%02d���T)�flush)�get_load_avgrrr�divmod�int�print)	rr�empty�load_avg�log_time�mins�secs�hours�formatted_log_times	         r�logz
Logger.logs�������$�$�&�������~�Q�t�f�5�D��$�$�&����8���C��M�2�.�
��d��T�2�&���t�+�u�d�D�.A�A��$�%�Q�t�f�-������9�D�
�d�$�rc��ttd�rtj�dS|j�|jj�Sy)N�
getloadavgr)�hasattr�osr2r�rs rr%zLogger.get_load_avg,sA���2�|�$��=�=�?�1�%�%�� � �,��(�(�3�3�5�5�r�
test_index�textc� �|jry|j}||j�d��|j��}t	|j
�t	|j�z}|r|js|�d|��}|jd|�d|���y)Nr�/�[z] )	rrrr�len�bad�env_changedrr0)rr6r7rr�failss      r�display_progresszLogger.display_progress3s����;�;���-�-���d�3�3�4�@�4�5�d�6J�6J�5K�L���G�K�K� �3�w�':�':�#;�;�������V�1�U�G�$�D����1�T�F�"�T�F�#�$r�runtestsc���|jrd|_d|_ydjt	|j
��|_t	|j�dz
|_y)Nrrz/{}r)�foreverrr�formatr;�tests)rr@s  r�	set_testszLogger.set_tests?sM�����#%�D� �$%�D�!�#(�<�<��H�N�N�0C�#D�D� �$'��(<�(<�$=��$A�D�!rc�z�tsy	t�|_y#t$r}t	d|���Yd}~yd}~wwxYw)Nz%Failed to create WindowsLoadTracker: )rrr�PermissionErrorr)r�errors  r�start_load_trackerzLogger.start_load_trackerGs@����	K�$6�$8�D�!���	K�
�A�%��I�J�J��	K�s��	:�5�:c�`�|j�y|jj�d|_y)N)r�closer5s r�stop_load_trackerzLogger.stop_load_trackerRs+��� � �(�����#�#�%� $��r)r)rN)�__name__�
__module__�__qualname__r�boolr�strr0�floatr%r'r?rrErIrL�rrr
r

sz�����D��t�� �� �T� �*�e�d�l��
%�3�
%�c�
%�d�
%�B�(�B�t�B�	K�%rr
)
r4r�test.supportrrrr@r�utilsr�	win_utilsrr
rSrr�<module>rWs)��	��#� �� �
�-�I%�I%r

Zerion Mini Shell 1.0