관리-도구
편집 파일: performance_test.cpython-311.pyc
� �܋f< � � � d Z ddlZddlZddlZddlmZ ddlmZ ej � d� � r� G d� de� � Z G d� d e� � Z ej ed � � G d� de� � � � Z d � Z ed� � D ]8Zd ee� � z Z ee ee� � d ee� � z Z eeee� � �9edk r ej � � dS dS dS )z>Shall provide tests to check performance overhead of pyfakefs.� N)�TestCase)�IS_PYPY�TEST_PERFORMANCEc �F � e Zd Zedd�� � Zedd�� � Zdd�ZdS )�SetupPerformanceTest�returnNc �6 � t j � � | _ d S �N��time� start_time��clss �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyfakefs/tests/performance_test.py� setUpClasszSetupPerformanceTest.setUpClass � � �!�Y�[�[�C�N�N�N� c � � t j � � | j z | _ t d� | j dz � � � � d S )Nz1Elapsed time per test for cached setup: {:.3f} ms� �r r �elapsed_time�print�formatr s r � tearDownClassz"SetupPerformanceTest.tearDownClass sQ � �#�y�{�{�S�^�;�C���C�J�J��$�r�)�� � � � � � r c �. � | � � � d S r �� setUpPyfakefs��selfs r �setUpzSetupPerformanceTest.setUp$ s � ���� � � � � r �r N��__name__� __module__�__qualname__�classmethodr r r � r r r r sf � � � � � � � )� )� )� �� )� � � � � �� � !� !� !� !� !� !r r c �F � e Zd Zedd�� � Zedd�� � Zdd�ZdS )�SetupNoCachePerformanceTestr Nc �6 � t j � � | _ d S r r r s r r z&SetupNoCachePerformanceTest.setUpClass( r r c � � t j � � | j z | _ t d� | j dz � � � � d S )Nz3Elapsed time per test for uncached setup: {:.3f} msr r r s r r z)SetupNoCachePerformanceTest.tearDownClass, sQ � �#�y�{�{�S�^�;�C���E�L�L��$�r�)�� � � � � � r c �2 � | � d�� � d S )NF)� use_cacher r s r r z!SetupNoCachePerformanceTest.setUp5 s � ������/�/�/�/�/r r! r"