~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Ian Clatworthy
  • Date: 2007-07-27 05:57:27 UTC
  • mto: (2658.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2659.
  • Revision ID: ian.clatworthy@internode.on.net-20070727055727-yxxco3di19yykrev
Dump profiling data for KCacheGrind if the filename starts with callgrind.out

Show diffs side-by-side

added added

removed removed

Lines of Context:
553
553
    if filename is None:
554
554
        stats.pprint()
555
555
    else:
556
 
        stats.save(filename)
 
556
        if filename.startswith("callgrind.out"):
 
557
            fmt = "callgrind"
 
558
        else:
 
559
            # Get from extension
 
560
            fmt = None
 
561
        stats.save(filename, fmt)
557
562
        trace.note('Profile data written to "%s".', filename)
558
563
    return ret
559
564