
    Xj                    \    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y)	    )annotations)Path)Iterator)Profiler)SchemaExtensionc                  6    e Zd ZdZ ed      f	 	 	 ddZddZy)PyInstrumentzHExtension to profile the execution time of resolvers using PyInstrument.zpyinstrument.htmlc                    || _         y )N)_report_path)selfreport_paths     o/var/www/html/myl_app/scheduler-service/venv/lib/python3.12/site-packages/strawberry/extensions/pyinstrument.py__init__zPyInstrument.__init__   s     (    c              #     K   t               }|j                          d  |j                          t        | j                  d      j                  |j                                y w)Nzutf-8)encoding)r   startstopr   r   
write_textoutput_html)r   profilers     r   on_operationzPyInstrument.on_operation   sG     :T1<<X=Q=Q=STs   A$A&N)r   r   returnNone)r   zIterator[None])__name__
__module____qualname____doc__r   r   r    r   r   r	   r	      s-    R !!45(( 
(Ur   r	   N)
__future__r   pathlibr   typingr   pyinstrumentr   $strawberry.extensions.base_extensionr   r	   __all__r   r   r   <module>r&      s,    "   ! @U? U( 
r   