ArticleDirectory
- Increase the duration timeout bit
In Visual Studio, a single-dollar organization records the duration of each batch. If there are several methods to improve performance, I used to useStopwatch,Recently, I have switched to a single-unit billing method, which is fast and simple.
Example: Some people say that catch does not apply expection, because it does not need to be matched to be faster than catch. I don't believe it. Let's just look at it again.
Public void test1 () {for (INT I = 0; I <100000; I ++) {try {VaR value = int. parse ("A") ;}catch {}} public void Test2 () {for (INT I = 0; I <100000; I ++) {try {VaR value = int. parse ("A");} catch (exception ){}}}
It seems so fast.
Increase the duration timeout bit
In the test results setting window set by the operation, there is no duration bit. You must add it by yourself.
Press "right" on the test results window and select "Add/Remove columns ".
Select the duration parameter bit. In this way, you can see the final result at a glance in test results.