User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs:profiling:start [2017/01/02 13:35]
James Irwin [Notes on Optimizing Code]
cs:profiling:start [2017/01/13 15:00] (current)
Brandon Kallaher [C++]
Line 9: Line 9:
 This will start up your node. Let it run for a while, then use ''​rosnode kill''​ to kill your node, and valgrind will dump its output to a file called ''​callgrind.out.<​pid>''​. This will start up your node. Let it run for a while, then use ''​rosnode kill''​ to kill your node, and valgrind will dump its output to a file called ''​callgrind.out.<​pid>''​.
  
-Next, load up this output file with kcachgrind:+Next, load up this output file with kcachegrind:
   kcachegrind callgrind.out.<​pid>​   kcachegrind callgrind.out.<​pid>​
  
 ===== Python ===== ===== Python =====
-Run your program ​iwth profiling turned on:+Run your program ​with profiling turned on:
   python -m cProfile -o <profile file name> <​script>​.py   python -m cProfile -o <profile file name> <​script>​.py