
    $g                    d    d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	  G d de	          Z
dgZdS )	    )annotations)Path)Iterator)Profiler)SchemaExtensionc                  8    e Zd ZdZ ed          fddZdd	Zd
S )PyInstrumentzHExtension to profile the execution time of resolvers using PyInstrument.zpyinstrument.htmlreport_pathr   returnNonec                    || _         d S )N)_report_path)selfr
   s     b/var/www/html/netbox-4.1.3/venv/lib/python3.11/site-packages/strawberry/extensions/pyinstrument.py__init__zPyInstrument.__init__   s     (    Iterator[None]c              #     K   t                      }|                                 d V  |                                 t          | j        d                              |                                           d S )Nzutf-8)encoding)r   startstopr   r   
write_textoutput_html)r   profilers     r   on_operationzPyInstrument.on_operation   sk      ::T111<<X=Q=Q=S=STTTTTr   N)r
   r   r   r   )r   r   )__name__
__module____qualname____doc__r   r   r    r   r   r	   r	      s]        RR !D!455( ( ( ( (U U U U U Ur   r	   N)
__future__r   pathlibr   typingr   pyinstrumentr   $strawberry.extensions.base_extensionr   r	   __all__r    r   r   <module>r'      s    " " " " " "             ! ! ! ! ! ! @ @ @ @ @ @U U U U U? U U U( 
r   