~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to profile_imports.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-13 03:20:41 UTC
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20060913032041-593053ae0d35b0d5
Update output of --profile-imports to understand from foo import bar time

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        # scope_name, frame_name, frame_lineno
83
83
        out_file.write('%5.1f %5.1f %s %-35s\t@ %s:%d\n'
84
84
            % (info[-1]*1000., mod_time*1000., '+'*info[0], 
85
 
               cur[1][:40], info[1], info[2]))
 
85
               cur[1][:35], info[1], info[2]))
86
86
 
87
87
        if sorted:
88
88
            c_times.sort()
125
125
        extra = ' (lazy)'
126
126
        frame = sys._getframe(4)
127
127
        frame_name = frame.f_globals.get('__name__', '<unknown>')
 
128
    if fromlist:
 
129
        extra += ' [%s]' % (', '.join(map(str, fromlist)),)
128
130
    frame_lineno = frame.f_lineno
129
131
 
130
132
    this = stack_add(name+extra, frame_name, frame_lineno, scope_name)