diff --git a/xml/System.Diagnostics.Metrics/Counter`1.xml b/xml/System.Diagnostics.Metrics/Counter`1.xml
index 0ae2def7c63..33ebdb20127 100644
--- a/xml/System.Diagnostics.Metrics/Counter`1.xml
+++ b/xml/System.Diagnostics.Metrics/Counter`1.xml
@@ -27,16 +27,17 @@
The type that the counter represents.
- Represents an instrument that supports adding non-negative values. For example, you might call counter.Add(1) each time a request is processed to track the total number of requests. Most metric viewers display counters using a rate (requests/sec), by default, but can also display a cumulative total.
+ Represents an instrument that supports adding non-negative values. For example, you might call counter.Add(1) each time a request is processed to track the total number of requests. Most metric viewers display counters using a rate (requests/sec), by default, but can also display a cumulative total.
, , , , , , and
+This class supports only the following generic parameter types: , , , , , , and .
]]>
+ Creating metrics
@@ -59,7 +60,7 @@ This class supports only the following generic parameter types:
The increment measurement.
- Record the increment value of the measurement.
+ Records the increment value of the measurement.
To be added.
@@ -85,7 +86,7 @@ This class supports only the following generic parameter types:
The increment measurement.
A key-value pair tag associated with the measurement.
- Record the increment value of the measurement.
+ Records the increment value of the measurement.
To be added.
@@ -118,7 +119,7 @@ This class supports only the following generic parameter types:
The increment measurement.
A list of key-value pair tags associated with the measurement.
- Record the increment value of the measurement.
+ Records the increment value of the measurement.
To be added.
@@ -177,7 +178,7 @@ This class supports only the following generic parameter types:
The increment measurement.
A span of key-value pair tags associated with the measurement.
- Record the increment value of the measurement.
+ Records the increment value of the measurement.
To be added.
@@ -205,7 +206,7 @@ This class supports only the following generic parameter types: The increment measurement.
A first key-value pair tag associated with the measurement.
A second key-value pair tag associated with the measurement.
- Record the increment value of the measurement.
+ Records the increment value of the measurement.
To be added.
@@ -235,7 +236,7 @@ This class supports only the following generic parameter types: A first key-value pair tag associated with the measurement.
A second key-value pair tag associated with the measurement.
A third key-value pair tag associated with the measurement.
- Record the increment value of the measurement.
+ Records the increment value of the measurement.
To be added.
diff --git a/xml/System.Diagnostics.Metrics/Histogram`1.xml b/xml/System.Diagnostics.Metrics/Histogram`1.xml
index 6a0a1681e91..179a963ebfe 100644
--- a/xml/System.Diagnostics.Metrics/Histogram`1.xml
+++ b/xml/System.Diagnostics.Metrics/Histogram`1.xml
@@ -27,18 +27,17 @@
The type that the histogram represents.
- Represents a metrics Instrument that can be used to report arbitrary values that are likely to be statistically meaningful.
- e.g. the request duration.
- Use method to create the Histogram object.
+ Represents a metrics instrument that can be used to report arbitrary values that are likely to be statistically meaningful, for example, the request duration. Call to create a Histogram object.
, , , , , , and
+This class supports only the following generic parameter types: , , , , , , and .
]]>
+ Creating metrics
@@ -61,7 +60,7 @@ This class supports only the following generic parameter types:
The measurement value.
- Record a measurement value.
+ Records a measurement value.
To be added.
@@ -87,7 +86,7 @@ This class supports only the following generic parameter types:
The measurement value.
A key-value pair tag associated with the measurement.
- Record a measurement value.
+ Records a measurement value.
To be added.
@@ -120,7 +119,7 @@ This class supports only the following generic parameter types:
The measurement value.
A list of key-value pair tags associated with the measurement.
- Record a measurement value.
+ Records a measurement value.
To be added.
@@ -179,7 +178,7 @@ This class supports only the following generic parameter types:
The measurement value.
A span of key-value pair tags associated with the measurement.
- Record a measurement value.
+ Records a measurement value.
To be added.
@@ -207,7 +206,7 @@ This class supports only the following generic parameter types: The measurement value.
A first key-value pair tag associated with the measurement.
A second key-value pair tag associated with the measurement.
- Record a measurement value.
+ Records a measurement value.
To be added.
@@ -237,7 +236,7 @@ This class supports only the following generic parameter types: A first key-value pair tag associated with the measurement.
A second key-value pair tag associated with the measurement.
A third key-value pair tag associated with the measurement.
- Record a measurement value.
+ Records a measurement value.
To be added.
diff --git a/xml/System.Diagnostics.Metrics/Meter.xml b/xml/System.Diagnostics.Metrics/Meter.xml
index fc5162900d5..73e4c525ffb 100644
--- a/xml/System.Diagnostics.Metrics/Meter.xml
+++ b/xml/System.Diagnostics.Metrics/Meter.xml
@@ -20,6 +20,7 @@
Meter is the class responsible for creating and tracking the Instruments.
To be added.
+ Tutorial: Create metrics
diff --git a/xml/System.Diagnostics.Metrics/ObservableCounter`1.xml b/xml/System.Diagnostics.Metrics/ObservableCounter`1.xml
index a79769dca92..1ef94f2e48e 100644
--- a/xml/System.Diagnostics.Metrics/ObservableCounter`1.xml
+++ b/xml/System.Diagnostics.Metrics/ObservableCounter`1.xml
@@ -27,18 +27,17 @@
The type that the observable counter represents.
- ObservableCounter is a metrics observable Instrument which reports monotonically increasing value(s) when the instrument is being observed.
- e.g. CPU time (for different processes, threads, user mode or kernel mode).
- Use Meter.CreateObservableCounter methods to create the observable counter object.
+ Represents a metrics-observable instrument that reports monotonically increasing values when the instrument is being observed, for example, CPU time (for different processes, threads, user mode, or kernel mode). Call to create the observable counter object.
, , , , , , and
+This class supports only the following generic parameter types: , , , , , , and .
]]>
+ Creating metrics
diff --git a/xml/System.Diagnostics.Metrics/ObservableGauge`1.xml b/xml/System.Diagnostics.Metrics/ObservableGauge`1.xml
index 5201313f42d..f3e280679f8 100644
--- a/xml/System.Diagnostics.Metrics/ObservableGauge`1.xml
+++ b/xml/System.Diagnostics.Metrics/ObservableGauge`1.xml
@@ -27,17 +27,17 @@
To be added.
- ObservableGauge is an observable Instrument that reports non-additive value(s) when the instrument is being observed.
- e.g. the current room temperature Use Meter.CreateObservableGauge methods to create the observable counter object.
+ Represents an observable instrument that reports non-additive values when the instrument is being observed, for example, the current room temperature. Call to create the observable counter object.
, , , , , , and
+This class supports only the following generic parameter types: , , , , , , and .
]]>
+ Creating metrics
@@ -57,8 +57,8 @@ This class supports only the following generic parameter types:
- Observe() fetches the current measurements being tracked by this observable counter.
- To be added.
+ Fetches the current measurements being tracked by this observable counter.
+ An enumeration of measurements of type `` that are being tracked by this observable counter.
To be added.
diff --git a/xml/System.Diagnostics.Tracing/EventCounter.xml b/xml/System.Diagnostics.Tracing/EventCounter.xml
index b4562bc9fc7..edb02fb7540 100644
--- a/xml/System.Diagnostics.Tracing/EventCounter.xml
+++ b/xml/System.Diagnostics.Tracing/EventCounter.xml
@@ -68,6 +68,7 @@ For an example of how to use the
]]>
+ EventCounters in .NET
diff --git a/xml/System.Diagnostics.Tracing/IncrementingEventCounter.xml b/xml/System.Diagnostics.Tracing/IncrementingEventCounter.xml
index 15a5d26a1db..21e37f5942e 100644
--- a/xml/System.Diagnostics.Tracing/IncrementingEventCounter.xml
+++ b/xml/System.Diagnostics.Tracing/IncrementingEventCounter.xml
@@ -43,6 +43,7 @@
]]>
+ EventCounters in .NET
diff --git a/xml/System.Diagnostics.Tracing/IncrementingPollingCounter.xml b/xml/System.Diagnostics.Tracing/IncrementingPollingCounter.xml
index a04a89450da..d49d55cf3fc 100644
--- a/xml/System.Diagnostics.Tracing/IncrementingPollingCounter.xml
+++ b/xml/System.Diagnostics.Tracing/IncrementingPollingCounter.xml
@@ -47,6 +47,7 @@ For an example that uses
+ EventCounters in .NET
diff --git a/xml/System.Diagnostics.Tracing/PollingCounter.xml b/xml/System.Diagnostics.Tracing/PollingCounter.xml
index 745aca75a41..747242a9f4d 100644
--- a/xml/System.Diagnostics.Tracing/PollingCounter.xml
+++ b/xml/System.Diagnostics.Tracing/PollingCounter.xml
@@ -47,6 +47,7 @@ For an example that uses inside
]]>
+ EventCounters in .NET
diff --git a/xml/System.Diagnostics/PerformanceCounter.xml b/xml/System.Diagnostics/PerformanceCounter.xml
index 80c675d1517..2ae5d6424ae 100644
--- a/xml/System.Diagnostics/PerformanceCounter.xml
+++ b/xml/System.Diagnostics/PerformanceCounter.xml
@@ -57,14 +57,14 @@
## Remarks
The component can be used for both reading existing predefined or custom counters and publishing (writing) performance data to custom counters.
- There are numerous predefined counters listed in the Windows Performance Monitor's [Add Counters dialog box](https://go.microsoft.com/fwlink/p/?LinkId=257854). To learn about the .NET Framework performance counters, see [Performance Counters](/dotnet/framework/debug-trace-profile/performance-counters).
+ There are numerous predefined counters listed in the Windows Performance Monitor's [Add Counters dialog box](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc749266(v=ws.11)). To learn about the .NET Framework performance counters, see [Performance Counters](/dotnet/framework/debug-trace-profile/performance-counters).
This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic.
> [!IMPORTANT]
-> In versions 1.0 and 1.1 of the .NET Framework, this class requires immediate callers to be fully trusted. Starting with the .NET Framework version 2.0, this class requires for specific actions. It is strongly recommended that not be granted to semi-trusted code. The ability to read and write performance counters allows code to perform actions such as enumerating executing processes and obtaining information about them.
+> In versions 1.0 and 1.1 of .NET Framework, this class requires immediate callers to be fully trusted. Starting with .NET Framework version 2.0, this class requires for specific actions. It is strongly recommended that not be granted to semi-trusted code. The ability to read and write performance counters allows code to perform actions such as enumerating executing processes and obtaining information about them.
>
-> In addition, passing a object to less-trusted code can create a security issue. Never pass performance counter objects, such as a or , to less trusted code.
+> In addition, passing a object to less-trusted code can create a security issue. Never pass performance counter objects, such as a or , to less trusted code.
To read from a performance counter, create an instance of the class, set the , , and, optionally, the or properties, and then call the method to take a performance counter reading.
@@ -84,9 +84,7 @@
To obtain performance data for counters that required an initial or previous value for performing the necessary calculation, call the method twice and use the information returned as your application requires.
> [!NOTE]
-> Performance counter categories installed with the .NET Framework 2.0 use separate shared memory, with each performance counter category having its own memory. You can specify the size of separate shared memory by creating a DWORD named FileMappingSize in the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\\*\*\Performance. The FileMappingSize value is set to the shared memory size of the category. The default size is 131072 decimal. If the FileMappingSize value is not present, the `fileMappingSize` attribute value for the `performanceCounters` element specified in the Machine.config file is used, causing additional overhead for configuration file processing. You can realize a performance improvement for application startup by setting the file mapping size in the registry. For more information about the file mapping size, see [<performanceCounters>](/dotnet/framework/configure-apps/file-schema/trace-debug/performancecounters-element).
-
-
+> Performance counter categories installed with the .NET Framework 2.0 use separate shared memory, with each performance counter category having its own memory. You can specify the size of separate shared memory by creating a DWORD named FileMappingSize in the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\\*\*\Performance. The FileMappingSize value is set to the shared memory size of the category. The default size is 131072 decimal. If the FileMappingSize value is not present, the `fileMappingSize` attribute value for the `performanceCounters` element specified in the Machine.config file is used, causing additional overhead for configuration file processing. You can realize a performance improvement for application startup by setting the file mapping size in the registry. For more information about the file mapping size, see [<performanceCounters>](/dotnet/framework/configure-apps/file-schema/trace-debug/performancecounters-element).
## Examples
The following code example demonstrates the use of the class to create and use an counter type. The example creates categories, sets up counters, collects data from the counters, and calls the class to interpret the performance counter data. The intermediate and final results are displayed in the console window. For additional examples of other performance counter types, see the enumeration.
@@ -146,9 +144,7 @@
This constructor does not initialize the performance counter, so it does not associate the instance with an existing counter on the local computer. To point to a specific performance counter, set the , , and, optionally, the and properties before reading any other properties or attempting to read from a counter. To write to a performance counter, set the property to `false`.
> [!NOTE]
-> The attribute applied to this member has the following property value: | . The does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the class or [SQL Server Programming and Host Protection Attributes](/dotnet/framework/performance/sql-server-programming-and-host-protection-attributes).
-
-
+> The attribute applied to this member has the following property value: | . The does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the class or [SQL Server Programming and Host Protection Attributes](/dotnet/framework/performance/sql-server-programming-and-host-protection-attributes).
## Examples
The following code example creates a default instance of the class. After the instance is created, the , , and property values are set, and the results of a call to the method are displayed.
@@ -301,9 +297,7 @@
>
> To avoid having to elevate your privileges to access performance counters in Windows Vista, add yourself to the Performance Monitor Users group.
>
-> In Windows Vista, User Account Control (UAC) determines the privileges of a user. If you are a member of the Built-in Administrators group, you are assigned two run-time access tokens: a standard user access token and an administrator access token. By default, you are in the standard user role. To execute the code that accesses performance counters, you must first elevate your privileges from standard user to administrator. You can do this when you start an application by right-clicking the application icon and indicating that you want to run as an administrator.
-
-
+> In Windows Vista, User Account Control (UAC) determines the privileges of a user. If you are a member of the Built-in Administrators group, you are assigned two run-time access tokens: a standard user access token and an administrator access token. By default, you are in the standard user role. To execute the code that accesses performance counters, you must first elevate your privileges from standard user to administrator. You can do this when you start an application by right-clicking the application icon and indicating that you want to run as an administrator.
## Examples
The following code example creates an instance of the class. The example passes in category names, counter names, and a flag value indicating that the counter is not read-only. This code example is part of a larger example for the class.
@@ -740,9 +734,7 @@
For example, one Windows counter category is the Memory category. System counters within this category track memory data such as the number of bytes available and the number of bytes cached. If you wanted to work with the bytes cached in your application, you would create an instance of the component, connect it to the Memory category, and then pick the appropriate counter (in this case, Cached Bytes) from that category.
- Although your system makes many more counter categories available, the categories that you will probably interact with most frequently are the Cache, Memory, Objects, PhysicalDisk, Process, Processor, Server, System, and Thread categories.
-
-
+ Although your system makes many more counter categories available, the categories that you will probably interact with most frequently are the Cache, Memory, Objects, PhysicalDisk, Process, Processor, Server, System, and Thread categories.
## Examples
The following code example creates a default instance of the class. After the instance is created, the , , and property values are set, and the results of a call to the method are displayed.