File: //usr/lib/python3/dist-packages/mercurial/__pycache__/lsprofcalltree.cpython-310.pyc
o
�]Lb�
� @ s8 d Z ddlmZ ddlmZ dd� ZG dd� de�Zd S )
aC
lsprofcalltree.py - lsprof output which is readable by kcachegrind
Authors:
* David Allouche <david <at> allouche.net>
* Jp Calderone & Itamar Shtull-Trauring
* Johan Dahlin
This software may be used and distributed according to the terms
of the GNU General Public License, incorporated herein by reference.
� )�absolute_import� )�pycompatc C s8 t | t�rdt�| � S dt�| j�t�| j�| jf S )N� ~s %s %s:%d)�
isinstance�strr �sysbytes�co_name�co_filename�co_firstlineno)�code� r
�:/usr/lib/python3/dist-packages/mercurial/lsprofcalltree.py�label s
�r c @ s4 e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� ZdS )�KCacheGrindc C s |� � | _d | _d S )N)�getstats�data�out_file)�self�profilerr
r
r �__init__ s
zKCacheGrind.__init__c C s2 || _ |�d� | �� | jD ]}| �|� qd S )Ns events: Ticks
)r �write�_print_summaryr �_entry)r r �entryr
r
r �output# s
�zKCacheGrind.outputc C s<