views:

157

answers:

4

I have a project written in C and I would like to know if there is a simple way to profile its execution time and memory usage under Windows.

Thanks in advance.

A: 

Timing information is easy enough: create a .bat file invoking the program, output the current system time before the program starts and after it ends...something like this in pseudocode:

print system time
execute program
print system time

As for memory consumption, I would say it's a bit more involved, although definitely doable. You might try something along these lines...

Tomislav Nakic-Alfirevic
+3  A: 

You can launch process monitor, run your program, and then go back to procmon and use Tools/Process Activity Summary to have an overview of the time and memory used by your program.

plodoc
A: 

Use PARASOFT INSURE++

Downlaod the Free-Trial here...

http://www.parasoft.com/jsp/products/insure.jsp;jsessionid=baa-n8_lkqOzsA

GOOD LUCK!!

CVS-2600Hertz
I was hoping for a free/open-source solution. I will take a look at though.
Tim Cooper
A: 

If you need more detailed profiling information about execution times of various parts of the program, I have had good luck with the Very Sleepy Profiler. It is simple to install and gives good information.

bde