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

System.Diagnostics.CounterSample

Defines a structure that holds the raw data for a performance counter.
public static CounterSample Empty

Defines an empty, uninitialized performance counter sample of type NumberOfItems32.

public long BaseValue { get; }

Gets an optional, base raw value for the counter.

public long CounterFrequency { get; }

Gets the raw counter frequency.

public long CounterTimeStamp { get; }

Gets the counter's time stamp.

Gets the performance counter type.

public long RawValue { get; }

Gets the raw value of the counter.

public long SystemFrequency { get; }

Gets the raw system frequency.

public long TimeStamp { get; }

Gets the raw time stamp.

public long TimeStamp100nSec { get; }

Gets the raw, high-fidelity time stamp.

public CounterSample(long rawValue, long baseValue, long counterFrequency, long systemFrequency, long timeStamp, long timeStamp100nSec, PerformanceCounterType counterType)

Initializes a new instance of the CounterSample structure and sets the CounterTimeStamp property to 0 (zero).

public CounterSample(long rawValue, long baseValue, long counterFrequency, long systemFrequency, long timeStamp, long timeStamp100nSec, PerformanceCounterType counterType, long counterTimeStamp)

Initializes a new instance of the CounterSample structure and sets the CounterTimeStamp property to the value that is passed in.

public static float Calculate(CounterSample counterSample)

Calculates the performance data of the counter, using a single sample point. This method is generally used for uncalculated performance counter types.

public static float Calculate(CounterSample counterSample, CounterSample nextCounterSample)

Calculates the performance data of the counter, using two sample points. This method is generally used for calculated performance counter types, such as averages.

public static bool op_Equality(CounterSample a, CounterSample b)

Returns a value that indicates whether two CounterSample structures are equal.

public static bool op_Inequality(CounterSample a, CounterSample b)

Returns a value that indicates whether two CounterSample structures are not equal.

public bool Equals(CounterSample sample)

Indicates whether the specified CounterSample structure is equal to the current CounterSample structure.