Tools is the right answer, but if you cannot figure out how to use it, then another option is the profiler of the built-in Activity Monitor application. In Activity Monitor you can get information about any running process and there is a button to try to execute it for a while. You will need to run your program, switch to Activity Monitor, find the process and then try it.
In addition, you can "profile a bad person" simply by running the program in the debugger and manually suspending it half a dozen times or so and marking the call stack at that time. It is very simple, but it works surprisingly well, as a first pass for a large part of the programs.
bames53 Mar 15 '13 at 20:01 2013-03-15 20:01
source share