| Server IP : 178.105.222.151 / Your IP : 216.73.216.38 Web Server : nginx/1.28.3 System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.5.4 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/lib/python3/dist-packages/cloudinit/__pycache__/ |
Upload File : |
+
��ig � �n � ^ RI t ^ RIt^ RIt]P ! ]4 t ! R R4 tRRRR/R R lltR# ) � Nc �N a � ] tR t^t o RtRRRR/V 3R lR lltR tR tR tV t R
# )�Timedaf
A context manager which measures and optionally logs context run time.
:param msg: A message that describes the thing that is being measured
:param threshold: Threshold, in seconds. When the context exceeds this
threshold, a log will be made.
:param log_mode: Control whether to log. Defaults to "threshold". Possible
values include:
"always" - Always log 'msg', even when 'threshold' is not reached.
"threshold" - Log when context time exceeds 'threshold'.
"skip" - Do not log. Context time and message are stored in the
'output' and 'delta' attributes, respectively. Used to manually
coalesce with other logs at the call site.
usage:
this call:
```
with Timed("Configuring the network"):
run_configure()
```
might produce this log:
```
Configuring the network took 0.100 seconds
```
� threshold�{�G�z�?�log_modec �, <� V ^8� d QhRS[ RS[RS[ /# �� �msgr r ��str�float)�format�
__classdict__s "��7/usr/lib/python3/dist-packages/cloudinit/performance.py�__annotate__�Timed.__annotate__% s) �� � � �
�� � �
�� c �T � Wn W n W0n R V n RV n RV n R# )� g N)r r r �output�start�delta)�selfr r r s &&$$r �__init__�Timed.__init__% s( � � ��"�� �
������
���
r c �: � \ P ! 4 V n V # )N)�time� monotonicr )r s &r � __enter__�Timed.__enter__3 s � ��^�^�%��
��r c � � \ P ! 4 V P ,
V n R V P R
R2pRV P 8X d$ \
P
RV P V4 R# RV P 8X d R# RV P 8X dW V P V P 8� d: \
P
RV P V4 V P RV 2V n R# R# \ R V P R
24 h)ztook z.3fz seconds�alwaysz%s %s�skipNr � zInvalid Timed log_mode value: 'z'.)r r r r r �LOG�debugr r r �
ValueError)r �exc_type�exc_val�exc_tb�suffixs &&&& r �__exit__�Timed.__exit__7 s� � ��^�^�%��
�
�2��
�����C�(��1���t�}�}�$��I�I�g�t�x�x��0�
�t�}�}�
$��
�D�M�M�
)��z�z�D�N�N�*�� � �'�4�8�8�V�4�!%���
�!�F�8�4��� +� �1�$�-�-���C��
r )r r r r r r N)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__r r r- �__static_attributes__�__classdictcell__)r s @r r r s7 �� � ��8� � �
$�� ��� r r r r r c �<