~mvo/software-center/add-profile-cmdline

« back to all changes in this revision

Viewing changes to software-center

  • Committer: Michael Vogt
  • Date: 2012-06-20 15:19:24 UTC
  • Revision ID: michael.vogt@ubuntu.com-20120620151924-6n80elzzky0403pl
add comment about gprof2dot, thanks to Nessita for this suggestion

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
                      default=False)
85
85
    parser.add_option("--profile", action="store_true",
86
86
                      help="use cProfile to gather a profile dump for e.g. "
87
 
                           "kcachegrind", 
 
87
                           "kcachegrind, runsnake, gprof2dot", 
88
88
                      default=False)
89
89
 
90
90
    (options, args) = parser.parse_args()
182
182
        #  $ python ./pyprof2calltree.py -i software-center_*.pyprof -k
183
183
        # OR
184
184
        #  $ runsnakerun software_center_*.pyprof 
 
185
        # OR
 
186
        #  gprof2dot (http://code.google.com/p/jrfonseca/wiki/Gprof2Dot):
 
187
        #  $ gprof2dot.py -f pstats software-center_20120620_114618.pyprof |\
 
188
        #     dot -Tpng -o output.png
 
189
        #  $ xdg-open output.png
 
190
        #
185
191
        # to analyse the data
186
192
        import cProfile
187
193
        fname = "software-center_%s.pyprof" % time.strftime("%Y%m%d_%H%M%S")