Profiling tools

CPU time

To see how much CPU time is used in
each function. Here's the manual:

Minimally, you just add
        -p -pg
to the compilation commands (gcc or g++),
then run the compiled program (preferably a several-second long run,
as Linux typically only takes 100 samples per second;
the three longest runs in your test cases look good for this.

After each run of the compiled program, you run
        gprof -Q
to see the summary of where the time was spent in.
(The data file is gmon.out, and running the program will
 overwrite it with a new one.)

// thanks to Nomimal Animal

Have questions? Comments?Let me know! 😀
Page created by G. (George) Samaras (DIT)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s