mercurial/lsprofcalltree.py
branchstable
changeset 49366 288de6f5d724
parent 48946 642e31cb55f0
equal deleted inserted replaced
49364:e8ea403b1c46 49366:288de6f5d724
     8 
     8 
     9 This software may be used and distributed according to the terms
     9 This software may be used and distributed according to the terms
    10 of the GNU General Public License, incorporated herein by reference.
    10 of the GNU General Public License, incorporated herein by reference.
    11 """
    11 """
    12 
    12 
    13 from __future__ import absolute_import
       
    14 
    13 
    15 from . import pycompat
    14 from . import pycompat
    16 
    15 
    17 
    16 
    18 def label(code):
    17 def label(code):
    25             pycompat.sysbytes(code.co_filename),
    24             pycompat.sysbytes(code.co_filename),
    26             code.co_firstlineno,
    25             code.co_firstlineno,
    27         )
    26         )
    28 
    27 
    29 
    28 
    30 class KCacheGrind(object):
    29 class KCacheGrind:
    31     def __init__(self, profiler):
    30     def __init__(self, profiler):
    32         self.data = profiler.getstats()
    31         self.data = profiler.getstats()
    33         self.out_file = None
    32         self.out_file = None
    34 
    33 
    35     def output(self, out_file):
    34     def output(self, out_file):