Class PerformanceCounter
- Namespace
- DotCompute.Runtime.Services
- Assembly
- DotCompute.Runtime.dll
Represents a performance counter for tracking metrics over time.
public sealed class PerformanceCounter : IDisposable
- Inheritance
-
PerformanceCounter
- Implements
- Inherited Members
- Extension Methods
Constructors
PerformanceCounter(string)
Represents a performance counter for tracking metrics over time.
public PerformanceCounter(string name)
Parameters
namestring
Properties
AverageValue
Gets or sets the average value.
public double AverageValue { get; }
Property Value
- double
The average value.
CurrentValue
Gets or sets the current value.
public double CurrentValue { get; }
Property Value
- double
The current value.
MaxValue
Gets or sets the max value.
public double MaxValue { get; }
Property Value
- double
The max value.
MinValue
Gets or sets the min value.
public double MinValue { get; }
Property Value
- double
The min value.
Name
Gets or sets the name.
public string Name { get; }
Property Value
- string
The name.
SampleCount
Gets or sets the sample count.
public int SampleCount { get; }
Property Value
- int
The sample count.
Unit
Gets or sets the unit.
public string? Unit { get; }
Property Value
- string
The unit.
Methods
CleanupOldSamples()
Performs cleanup old samples.
public void CleanupOldSamples()
Dispose()
Performs dispose.
public void Dispose()
RecordValue(double, string?)
Performs record value.
public void RecordValue(double value, string? unit = null)