- With the gnu compile suite, compile your code with the -g flag (this isn't necessary but provides a better profiling experience and you get timing down to individual lines of code)
- Open Instruments
- Select Time Profiler
- At the top by the red circle and pause button, select Choose target and select your code. Provide a working directory and inputs as desired/needed.
- Click the red circle to begin profiling.
- At the bottom you should see the Call Tree filing up
- Double click on any item in the Call Tree to get more information
Tuesday, December 15, 2015
Profiling Code on Mac
Today I found Instruments, a program available on the Mac OS for performing many code assessments including profiling. I found it very easy to use. Below are steps to profile a code.
Subscribe to:
Posts (Atom)