Archived

This topic is now archived and is closed to further replies.

BauerGL

2 questions :: VC++ profiler, howto? :: Is " " == '\n'?

Recommended Posts

BauerGL    467
Hi I need some answers on two unrelated topics. 1. How does the MSVC++ profiler work? I know what it does etc, but how can do I set it up, run it etc? I have searched the MSDN but I do not understand exactly how to do it. So any tips where to find information about what to do, or some straight help would be really appreciated. 2. Kinda strange question, but I wonder if a space " " is considered to be a newline mark ''\n'' when reading from file. For example if I do this: ifstream fin("config.cfg"); fin.ignore(100, ''\n''); Would it ignore 100 chars or until the first space "letter"? Or will it ignore 100 chars or until the first newline (return)? Thanks for reading, and hopefully helping. CUselessStuff::NiftyQuote();

Share this post


Link to post
Share on other sites
FunkyTune    122
Reply to Question 1:
First of all, compile and link your program, and check that it works ok.
Then, to run the profiler, just select "Profile" from the "Build" menu
If an alert appears that tells you that your project isn''t up to date or built with profiling enabled, then just select Project->Settings->Link Tab and check the box "Enable Profiling".

When you start the profiling, a window will come up to let you select some options. If you want to see how much time is spent in each function (which is what I use it for), select "Function Timing"

Your program will start when you press OK, and afterwards you will have the data on the Profile tab in the Output Window (the one at the bottom)

Hope that helps
/John

Share this post


Link to post
Share on other sites
BauerGL    467
Aah thank you really much. I got it to work now (it was easy, thanks to you) but I don''t understand much of the output. I see that it prints how many times each function has been called, and how long it has used a function. But if a function is called every frame, then the time for that function will go up. How can I see how long time just one call to the function takes?

Thanks again.

CUselessStuff::NiftyQuote();

Share this post


Link to post
Share on other sites