~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Kit Randel
  • Date: 2014-12-12 03:59:25 UTC
  • mto: This revision was merged to the branch mainline in revision 6602.
  • Revision ID: kit.randel@canonical.com-20141212035925-5nwyz5det0wtecce
fixed dirty_head logic in iter_file_patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# I made one modification to profile so that it returns a pair
4
4
# instead of just the Stats object
5
5
 
 
6
from __future__ import absolute_import
 
7
 
6
8
import cPickle
7
9
import os
8
10
import sys
275
277
        code = subentry.code
276
278
        totaltime = int(subentry.totaltime * 1000)
277
279
        #out_file.write('cob=%s\n' % (code.co_filename,))
278
 
        out_file.write('cfn=%s\n' % (label(code, True),))
279
280
        if isinstance(code, str):
280
281
            out_file.write('cfi=~\n')
 
282
            out_file.write('cfn=%s\n' % (label(code, True),))
281
283
            out_file.write('calls=%d 0\n' % (subentry.callcount,))
282
284
        else:
283
285
            out_file.write('cfi=%s\n' % (code.co_filename,))
 
286
            out_file.write('cfn=%s\n' % (label(code, True),))
284
287
            out_file.write('calls=%d %d\n' % (
285
288
                subentry.callcount, code.co_firstlineno))
286
289
        out_file.write('%d %d\n' % (lineno, totaltime))