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

System.Diagnostics.InstanceDataCollection

Provides a strongly typed collection of InstanceData objects.
public string CounterName { get; }

Gets the name of the performance counter whose instance data you want to get.

public InstanceData this[string instanceName] { get; }

Gets the instance data associated with this counter. This is typically a set of raw counter values.

public ICollection Keys { get; }

Gets the object and counter registry keys for the objects associated with this instance data.

public ICollection Values { get; }

Gets the raw counter values that comprise the instance data for the counter.

public InstanceDataCollection(string counterName)

Initializes a new instance of the InstanceDataCollection class, using the specified performance counter (which defines a performance instance).

public bool Contains(string instanceName)

Determines whether a performance instance with a specified name (identified by one of the indexed InstanceData objects) exists in the collection.

public void CopyTo(InstanceData[] instances, int index)

Copies the items in the collection to the specified one-dimensional array at the specified index.