CLR via C # Reading Notes 6-4 monitor appdomain resource usage

Source: Internet
Author: User

Appdomain.Monitoringisenabled is set to true to enable monitoring domain resources.

You can access the following attributes to obtain the resource consumption of the domain.

1.Monitoring1_vedmemorysize

2.Monitoring1_vedprocessmemorysize

3.Monitoringtotalallocatedmemorysize 

4.Monitoringtotalprocessortime

However, there are some very disgusting points here.

1. Enabling Monitoring is global. You cannot only monitor a specific domain.

2. If monitoringisenabled is set to true and then set to false, an argumentexception will be thrown.

This design is really bad... a property can only assign true to him ....

3. Enabling this monitoring will cause performance loss (it takes about 50% of the CPU time to complete the new object measurement)

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.