HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/cloudlinux/venv/lib/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!