/usr/lib/python3/dist-packages/cloudinit/__pycache__
NameSizeModeActions
apport.cpython-310.pyc73170644editdlrm
atomic_helper.cpython-310.pyc28780644editdlrm
cloud.cpython-310.pyc31990644editdlrm
dmi.cpython-310.pyc63100644editdlrm
event.cpython-310.pyc20760644editdlrm
features.cpython-310.pyc16680644editdlrm
gpg.cpython-310.pyc69120644editdlrm
helpers.cpython-310.pyc136850644editdlrm
importer.cpython-310.pyc17760644editdlrm
lifecycle.cpython-310.pyc83840644editdlrm
netinfo.cpython-310.pyc140660644editdlrm
performance.cpython-310.pyc36670644editdlrm
persistence.cpython-310.pyc29310644editdlrm
registry.cpython-310.pyc14820644editdlrm
safeyaml.cpython-310.pyc79310644editdlrm
settings.cpython-310.pyc11850644editdlrm
signal_handler.cpython-310.pyc26890644editdlrm
simpletable.cpython-310.pyc26880644editdlrm
socket.cpython-310.pyc47440644editdlrm
ssh_util.cpython-310.pyc158150644editdlrm
stages.cpython-310.pyc275610644editdlrm
subp.cpython-310.pyc99720644editdlrm
templater.cpython-310.pyc63740644editdlrm
temp_utils.cpython-310.pyc28370644editdlrm
type_utils.cpython-310.pyc4710644editdlrm
url_helper.cpython-310.pyc291510644editdlrm
user_data.cpython-310.pyc85150644editdlrm
util.cpython-310.pyc708780644editdlrm
version.cpython-310.pyc4660644editdlrm
warnings.cpython-310.pyc33760644editdlrm
__init__.cpython-310.pyc1450644editdlrm
Edit: /usr/lib/python3/dist-packages/cloudinit/__pycache__/performance.cpython-310.pyc (3667B)
o thg @sRddlZddlZddlZeeZGdddZddddededefd d Z dS) Nc@s>eZdZdZddddededefddZd d Zd d Zd S)Timeda 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 ``` {Gz? thresholdrlog_modemsgrcCs(||_||_||_d|_d|_d|_dS)Ng)rrroutputstartdelta)selfrrrr 7/usr/lib/python3/dist-packages/cloudinit/performance.py__init__%s  zTimed.__init__cCst|_|S)N)time monotonicr )r r r r __enter__3s zTimed.__enter__cCst|j|_d|jdd}d|jkrtd|j|dSd|jkr&dSd|jkrF|j|jkrDtd|j||jd||_ dSdSt d |jd ) Nztook z.3fz secondsalwaysz%s %sskipr zInvalid Timed log_mode value: 'z'.) rrr r rLOGdebugrrr ValueError)r exc_typeexc_valexc_tbsuffixr r r__exit__7s     zTimed.__exit__N) __name__ __module__ __qualname____doc__strfloatrrrr r r rrs   rrrrrrcsfdd}|S)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 ``` cs tfdd}|S)Ncs@td|i|WdS1swYdS)Nr)r)argskwargs)funcrrrr r decoratords $z)timed..wrapper..decorator) functoolswraps)r&r'rrr)r&rwrappercsztimed..wrapperr )rrrr+r r*rtimedHsr,) r(loggingr getLoggerrrrr"r#r,r r r rs  "@