CounterSet.CreateCounterSetInstance(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an instance of the counter set.
public:
System::Diagnostics::PerformanceData::CounterSetInstance ^ CreateCounterSetInstance(System::String ^ instanceName);
public System.Diagnostics.PerformanceData.CounterSetInstance CreateCounterSetInstance(string instanceName);
[System.Security.SecurityCritical]
public System.Diagnostics.PerformanceData.CounterSetInstance CreateCounterSetInstance(string instanceName);
member this.CreateCounterSetInstance : string -> System.Diagnostics.PerformanceData.CounterSetInstance
[<System.Security.SecurityCritical>]
member this.CreateCounterSetInstance : string -> System.Diagnostics.PerformanceData.CounterSetInstance
Public Function CreateCounterSetInstance (instanceName As String) As CounterSetInstance
- instanceName
- String
Name of the instance. The name must be unique.
An instance of the counter set which will contain the counter data.
- Attributes
The instance name is NULL.
You must add counters to the counter set before creating an instance of the counter set.
For an example, see System.Diagnostics.PerformanceData.
Call this method one time for single-instance counter sets and one or more times for multiple-instance counter sets.
The provider determines when it creates an instance. If the counter data is more static, the provider can create an instance at initialization time. For example, the number of processors on a computer would be considered static, so a provider that provides counter data for processors could create an instance for each processor on the computer at initialization time. For counters that are more dynamic, such as disk or process counters, the providers would create the new instances in response to a new USB device being added or a new process being created.
The provider should keep the counter data up-to-date at all times.
Proizvod | Verzije |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET povratne informacije
.NET je projekat otvorenog koda. Odaberite vezu za pružanje povratnih informacija: