~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Vincent Ladeuil
  • Date: 2012-02-14 17:22:37 UTC
  • mfrom: (6466 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6468.
  • Revision ID: v.ladeuil+lp@free.fr-20120214172237-7dv7er3n4uy8d5m4
Merge trunk

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))