[Use command line mode for profile]
[Example of "helloworld"]
1. First Open Your Workspace:
2. Select your project-> Settings...
3. Click Select link and check enable profiling. Press OK to complete the settings.
4. Select build-> "build" or "rebuild all" to build your workspace
5. After the build is complete, click build-> profile... the following dialog box is displayed:
6. Click function timing to show the time it takes for each function worker row.
7. Press OK to close the hosts window and start the profiling operation.
8. After profiling is completed, the results of the profile will be listed in the following response window:
9. For more detail, please read msdn reference:
Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/vccore98/html/_ core_run_the_profiler_from_the_development_environment.asp
10. The following is the result of printing the profile of 100 and 1000 helloworld (two functions) separately:
Profile: function timing, sorted by Time
Date: Fri Sep 30 23:55:17 2005
Program statistics
------------------
Command Line at 2005 Sep 30 23: 55: "D:/project/helloworld/debug/helloworld"
Total time: 2166.598 milliseconds
Time outside of functions: 0.563 millisecond
Call depth: 2
Total functions: 3
Total hits: 3
Function coverage 100.0%
Overhead calculated 4
Overhead average 4
Module statistics for helloworld.exe
------------------------------------
Time in module: 2166.034 millisecond
Percent of time in model: 100.0%
Functions in module: 3
Hits In module: 3
Module function coverage: 100.0%
Func + child hit
Time % time % count function
-------------------------------------------------------------
1725.777 79.7 1725.777 79.7 1 print1000hello (void) (main. OBJ)
440.255 20.3 440.255 20.3 1 print100hello (void) (main. OBJ)
0.002 0.0 2166.034 100.0 1 _ main (main. OBJ)