+
    ˜qgjg  ã                   ón   € ^ RI t ^ RIt^ RIt]P                  ! ]4      t ! R R4      tRRRR/R R lltR# )	é    Nc                   óN   a € ] tR t^t o RtRRRR/V 3R lR lltR tR tR	tV 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   QhRS[ RS[RS[ /# ©é   Úmsgr   r   ©ÚstrÚfloat)ÚformatÚ__classdict__s   "€Ú7/usr/lib/python3/dist-packages/cloudinit/performance.pyÚ__annotate__ÚTimed.__annotate__%   s)   ø€ ÷ ñ áðñ ð	ñ
 ñó    c               óT   € Wn         W n        W0n        R V n        RV n        RV 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 R2pRV P                  8X  d$   \
        P                  RV P                  V4       R# RV P                  8X  d   R# RV P                  8X  dW   V P                  V P                  8”  d:   \
        P                  RV P                  V4       V P                   RV 2V n	        R# R# \        R	V P                   R
24      h)ztook z.3fz secondsÚalwaysz%s %sÚskipNr   Ú zInvalid 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                ó<   € V ^8„  d   QhR\         R\        R\         /# r	   r   )r   s   "r   r   r   H   s!   € ÷ #ñ #Œsð #¤%ð #¼#ñ #r   c               ó   a aa€ VV V3R lpV# )a©  
A decorator 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'.

usage:

    this call:
    ```
    @timed("Configuring the network")
    def run_configure():
        ...
    ```

    might produce this log:
    ```
        Configuring the network took 0.100 seconds
    ```
c                 óN   <a € \         P                  ! S 4      V VVV3R  l4       pV# )c                  ó~   <€ \        SSSR 7      ;_uu_ 4        S! V / VB uuRRR4       #   + '       g   i     R# ; i))r   r   N)r   )ÚargsÚkwargsÚfuncr   r   r   s   *,€€€€r   Ú	decoratorÚ)timed.<locals>.wrapper.<locals>.decoratord   s/   ø€ ä�s i¸(×CÖCÙ˜TÐ, VÑ,÷ D×C×CÓCús   ˜+«<	)Ú	functoolsÚwraps)r<   r=   r   r   r   s   f €€€r   ÚwrapperÚtimed.<locals>.wrapperc   s&   ù€ Ü	�Š˜Ó	÷	-ó 
ð	-ð Ðr   © )r   r   r   rA   s   fdd r   ÚtimedrD   H   s   ú€ ÷6ð €Nr   )r?   Úloggingr   Ú	getLoggerr/   r&   r   rD   rC   r   r   Ú<module>rG      sA   ðÛ Û Û à×Ò˜Ó!€÷=ñ =ð@#¨$ð #À÷ #ñ #r   