<appDomainResourceMonitoring > 元素<appDomainResourceMonitoring> Element

指示运行时在过程的生命周期过程中收集所有应用程序域的统计数据。Instructs the runtime to collect statistics on all application domains in the process for the life of the process.

<configuration><configuration>
<运行时 ><runtime>
<appDomainResourceMonitoring><appDomainResourceMonitoring>

语法Syntax

<appDomainResourceMonitoring    
   enabled="true|false"/>  

特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.

特性Attributes

特性Attribute 描述Description
enabled 必需的特性。Required attribute.

指定是否在运行时收集的应用程序域资源监视统计信息。Specifies whether the runtime collects statistics for application domain resource monitoring.

enabled 特性enabled Attribute

“值”Value 描述Description
true 收集应用程序域资源监控的统计信息。Statistics for application domain resource monitoring are collected.
false 不收集有关应用程序域资源监控的统计信息。Statistics for application domain resource monitoring are not collected.

子元素Child Elements

无。None.

父元素Parent Elements

元素Element 描述Description
configuration 公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中的根元素。The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime 包含有关程序集绑定和垃圾回收的信息。Contains information about assembly binding and garbage collection.

备注Remarks

应用程序域资源监视仅可通过托管应用程序域类中,托管ICLRAppDomainResourceMonitor接口和事件跟踪的 Windows (ETW)。Application domain resource monitoring is available through the managed application domain class, the hosting ICLRAppDomainResourceMonitor interface, and event tracing for Windows (ETW). 启用监视后,在生命周期过程的过程中的所有应用程序域则收集统计信息。When monitoring is enabled, statistics are collected for all application domains in the process for the life of the process.

若要从托管代码启用监视,请使用MonitoringIsEnabled属性。To enable monitoring from managed code, use the MonitoringIsEnabled property.

此配置元素是仅适用于.NET Framework 4.NET Framework 4及更高版本。This configuration element is available only in the .NET Framework 4.NET Framework 4 and later.

示例Example

下面的示例演示如何启用应用程序域资源监视。The following example shows how to enable application domain resource monitoring.

<configuration>  
   <runtime>  
      <appDomainResourceMonitoring enabled="true"/>  
   </runtime>  
</configuration>  

请参阅See also