HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/__pycache__/storage.cpython-311.pyc
�

���ř�r���r�ddlZddlZejd��Zejd��ZGd�de��ZdS)�N�Tzcloudlinux-summaryc
��eZdZdZddddgdgddiddiddigd�	Zdejdefded	zd
e	e
effd�Zdejdefded
eded	zd
d	f
d�Zd	S)�StatisticsDictz>
    Special class to store all metrics before sending it
    z-42i���gE�)	�str�int�float�str_list�int_list�int_dict�
float_dict�str_dict�
rpm_stat_list�func.�log_messageN�returnc��	|��}n6#t$r)}|rt�d||��Yd}~dSd}~wwxYwd|fS)a�
        Method for catching any exceptions while calling the passed function,
        logging them and returning None and success flag if an exception has been encountered.
        Returns a formatted result of the function call otherwise.

        :param func:
            function that should be called
        :param log_message:
            if given, it will be logged as exception message.
        z%s. Exception: "%s"N)FNT)�	Exception�logger�	exception)�selfrr�result�errs     �py/clsummary/storage.py�
evaluate_safezStatisticsDict.evaluate_safe)sw��		��T�V�V�F�F���	�	�	��
�� � �)������
�;�;�;�;�;�����	�����V�|�s�

�
A�;�A�type_of_result�name_of_metricc�`�|�||��\}}|s
|j|}|||<dS)z�
        Calls `evaluate_safe` and saves the result from it
        in the metric dictionary.

        :param log_message:
            if given, it will be logged as exception message.
        See method `evaluate_safe` for more details.
        N)r�DEFAULT_RESULTS)rrrrr�successrs       r�
add_metriczStatisticsDict.add_metricEsJ�� �,�,���
�
����
�	:��)�.�9�F�%��^����)
�__name__�
__module__�__qualname__�__doc__r�typing�Callablerr�tuple�boolrr �r!rrrs������������G��E��3�
�
�5�
�
�5�
�
�#��O�(��/�#�q�&�)���t���
�t�Q�w��	����8&��/�#�q�&�)�&� �&� �	&�
�t��&�
�
&�&�&�&�&�&r!r)�loggingr&�TypeVarr�	getLoggerr�dictrr*r!r�<module>r/s{������
�
�
�
��F�N�3����	��	�/�	0�	0��N&�N&�N&�N&�N&�T�N&�N&�N&�N&�N&r!