Property StatsRecords
StatsRecords
Gets the replica statistics information for one or more replicas.
Declaration
public IReadOnlyDictionary<string, IReadOnlyList<ReplicaStatsRecord>> StatsRecords { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, IReadOnlyList<ReplicaStatsRecord>> | Replica statistics information as a dictionary with one entry per each replica for which the stats were requested/available. |
Remarks
This value is represented as a dictionary with keys being region id (see RegionId) of a replica and values being a list of ReplicaStatsRecord objects for that replica. If you passed region as parameter to one of GetReplicaStatsAsync methods, this dictionary will contain only one key-value pair for the given region.
Note that in either case this object will contain only keys for which there is at least one ReplicaStatsRecord returned (it will not contain keys for regions for which no stats records were found according to parameters specified in GetReplicaStatsOptions or applicable defaults).
Examples
Print replica lag info for EU_ZURICH_1 region.var statsRecords = statsResult.StatsRecords["eu-zurich-1"];
foreach(var statsRecord in statsRecords) {
Console.WriteLine(statsRecord);
$"Replica lag: {statsRecord.ReplicaLag}, " +
$"collected at {statsRecord.CollectionTime}");
}