Visual Studio single-dollar small application-linear transaction time

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.