Class ThroughputRates
Throughput rates (ops/sec) computed from two consecutive snapshots.
public sealed class ThroughputRates
- Inheritance
-
ThroughputRates
- Inherited Members
Examples
var snapshot = resourceGraph.GetSnapshot();
if (snapshot.Rates != null)
{
var hitRate = snapshot.Rates["Storage/PageCache"]["CacheHits"];
Console.WriteLine($"Cache hits per second: {hitRate:F1}");
}
Remarks
Rates are automatically computed by GetSnapshot() by comparing throughput counters between the current and previous snapshot.
The first snapshot has Rates = null since there's no previous snapshot to compare against.
Properties
this[string]
Get rates for a specific node path.
public IReadOnlyDictionary<string, double> this[string nodePath] { get; }
Parameters
nodePathstringPath to the node (e.g., "Storage/PageCache").
Property Value
- IReadOnlyDictionary<string, double>
Dictionary of metric name to rate (ops/sec). Empty if node not found.
NodePaths
All node paths with rate data.
public IEnumerable<string> NodePaths { get; }
Property Value
Methods
ContainsNode(string)
Checks if rates exist for a specific node path.
public bool ContainsNode(string nodePath)
Parameters
nodePathstringPath to the node.
Returns
- bool
True if the node has rate data.
GetRate(string, string)
Get a specific rate value.
public double GetRate(string nodePath, string metricName)
Parameters
Returns
- double
Rate in ops/sec, or 0 if not found.