a XC?hŽr ã @ sÊ d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z g d¢ZG dd „ d eeƒZed d�G dd „ d ƒƒZed d�G dd„ dƒƒZG dd„ dƒZG dd„ dƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd d!„ Zed"k�rÆddlZzddlZW n e�y, Y n0 G d#d$„ d$ej ƒZ!e"ej#ƒd%k�r\ej#d% Z$ndZ$zPe!e$ƒZ%ej#d&d… D ]Z&e% 'e&¡ �qxe(d'e%j)d(� e% *¡ e(d)e%j)d(� W n e+�yÄ Y n0 dS )*z3Class for printing reports on profiled python code.é N)ÚEnum)Ú cmp_to_key)Ú dataclass)ÚDict)ÚStatsÚSortKeyÚFunctionProfileÚStatsProfilec @ s8 e Zd ZdZdZdZdZdZdZdZ dZ d Zd d„ ZdS ) r )ÚcallsÚncalls)Ú cumulativeÚcumtime)ÚfilenameÚmoduleÚlineÚnameÚnflÚpcallsÚstdname)ÚtimeÚtottimec G s@ |d }t | |¡}||_|dd … D ]}|| j|<