<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="11.0.0-preview.4.26230.115" />

System.Diagnostics.PerformanceCounter

Represents a Windows NT performance counter component.
public static int DefaultFileMappingSize

Specifies the size, in bytes, of the global memory shared by performance counters. The default size is 524,288 bytes.

public string CategoryName { get; set; }

Gets or sets the name of the performance counter category for this performance counter.

public string CounterHelp { get; }

Gets the description for this performance counter.

public string CounterName { get; set; }

Gets or sets the name of the performance counter that is associated with this PerformanceCounter instance.

Gets the counter type of the associated performance counter.

Gets or sets the lifetime of a process.

public string InstanceName { get; set; }

Gets or sets an instance name for this performance counter.

public string MachineName { get; set; }

Gets or sets the computer name for this performance counter.

public long RawValue { get; set; }

Gets or sets the raw, or uncalculated, value of this counter.

public bool ReadOnly { get; set; }

Gets or sets a value indicating whether this PerformanceCounter instance is in read-only mode.

Initializes a new, read-only instance of the PerformanceCounter class, without associating the instance with any system or custom performance counter.

public PerformanceCounter(string categoryName, string counterName)

Initializes a new, read-only instance of the PerformanceCounter class and associates it with the specified system or custom performance counter on the local computer. This constructor requires that the category have a single instance.

public PerformanceCounter(string categoryName, string counterName, bool readOnly)

Initializes a new, read-only or read/write instance of the PerformanceCounter class and associates it with the specified system or custom performance counter on the local computer. This constructor requires that the category contain a single instance.

public PerformanceCounter(string categoryName, string counterName, string instanceName)

Initializes a new, read-only instance of the PerformanceCounter class and associates it with the specified system or custom performance counter and category instance on the local computer.

public PerformanceCounter(string categoryName, string counterName, string instanceName, bool readOnly)

Initializes a new, read-only or read/write instance of the PerformanceCounter class and associates it with the specified system or custom performance counter and category instance on the local computer.

public PerformanceCounter(string categoryName, string counterName, string instanceName, string machineName)

Initializes a new, read-only instance of the PerformanceCounter class and associates it with the specified system or custom performance counter and category instance, on the specified computer.

public static void CloseSharedResources()

Frees the performance counter library shared state allocated by the counters.

public void BeginInit()

Begins the initialization of a PerformanceCounter instance used on a form or by another component. The initialization occurs at runtime.

public void Close()

Closes the performance counter and frees all the resources allocated by this performance counter instance.

public long Decrement()

Decrements the associated performance counter by one through an efficient atomic operation.

public void EndInit()

Ends the initialization of a PerformanceCounter instance that is used on a form or by another component. The initialization occurs at runtime.

public long Increment()

Increments the associated performance counter by one through an efficient atomic operation.

public long IncrementBy(long value)

Increments or decrements the value of the associated performance counter by a specified amount through an efficient atomic operation.

Obtains a counter sample, and returns the raw, or uncalculated, value for it.

public float NextValue()

Obtains a counter sample and returns the calculated value for it.

public void RemoveInstance()

Deletes the category instance specified by the PerformanceCounter object InstanceName property.