VS is really the most powerful IDE in the universe, which I often talk about, anyway, I think it's very powerful.
The entire listening technology manager said the performance test, then I think the most powerful IDE in the universe should also have testing tools, then I Baidu a bit, and look at the option of VS, really have a performance-oriented.
This performance-oriented approach is primarily the test of a program when the process goes down, exactly what functions are called, and the total time-consuming percentage of the calling function.
When a high percentage of course is the key point of consumption performance pull ~
Cite the example of a great God: http://blog.zhaojie.me/2009/12/profiler-sampling.html can go here to see Bloggers ' articles, and there are examples
Start testing
Create a console and copy the Big God code from above to the console
Then I turned the mode from debug to release, I heard that release is code-optimized, so it must be optimized after the test will be better
Turn on the VS profiling tool-------------------> Analysis-performance orientation
Starting with the first Test, the test is very time consuming, the first one can find out the time-consuming of each function call, and click on the result of the first analysis.
Click on the function name, the main entrance, and look at the rightmost [called function] to see exactly which function is more time consuming, of course, if the program has the next layer, then click on one of the functions
Click on the testconvert--> to get the following figure, if the function is also included, then you can continue to jump in to see, and so on,
This performance test tool can clearly see the time-consuming situation of the function, and according to this, we can see where the performance bottleneck of the program appears.
Plainly, see where high up to see the code inside this method, of course, some operations must be time-consuming, it can go to see that it is not time-consuming, but the actual consumption is a great operation.
Performance testing tools for Visual Studio