~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lsprof.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-10-05 21:15:13 UTC
  • mfrom: (5448.3.5 374700-Add-gnu-lsh-support)
  • Revision ID: pqm@pqm.ubuntu.com-20101005211513-whouyj5t7oo92gmq
(gz) Add support for GNU lsh as a secure shell client (Matthew Gordon)

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
 
 
8
6
import cPickle
9
7
import os
10
8
import sys
277
275
        code = subentry.code
278
276
        totaltime = int(subentry.totaltime * 1000)
279
277
        #out_file.write('cob=%s\n' % (code.co_filename,))
 
278
        out_file.write('cfn=%s\n' % (label(code, True),))
280
279
        if isinstance(code, str):
281
280
            out_file.write('cfi=~\n')
282
 
            out_file.write('cfn=%s\n' % (label(code, True),))
283
281
            out_file.write('calls=%d 0\n' % (subentry.callcount,))
284
282
        else:
285
283
            out_file.write('cfi=%s\n' % (code.co_filename,))
286
 
            out_file.write('cfn=%s\n' % (label(code, True),))
287
284
            out_file.write('calls=%d %d\n' % (
288
285
                subentry.callcount, code.co_firstlineno))
289
286
        out_file.write('%d %d\n' % (lineno, totaltime))