Class QosStats
Syntax
Constructors
QosStats(Int32, Single)
Declaration
public QosStats(int numResults, float weightOfCurrentResult)
Parameters
| Type |
Name |
Description |
| Int32 |
numResults |
|
| Single |
weightOfCurrentResult |
|
Methods
AddResult(String, QosResult)
Declaration
[Obsolete("Use QosStats.ProcessResult() instead.")]
public void AddResult(string key, QosResult result)
Parameters
InRangeInclusive(Single, Single, Single)
Declaration
public static bool InRangeInclusive(float value, float min, float max)
Parameters
Returns
ProcessResult(String, QosResult)
Declaration
public void ProcessResult(string key, QosResult result)
Parameters
TryGetAllResults(String, out QosStatsResult[])
Get an array of all the results currently being tracked for the given key.
Declaration
public bool TryGetAllResults(string key, out QosStatsResult[] results)
Parameters
| Type |
Name |
Description |
| String |
key |
Key to identify the server (e.g. IP:port)
|
| QosStatsResult[] |
results |
Array of results (unweighted) used to compute the weighted average.
|
Returns
| Type |
Description |
| Boolean |
true if record(s) were found, false if key does not exist or no valid records found.
If false, results will be null, else it will contain the array of results.
|
TryGetWeightedAverage(String, out QosStatsResult)
Get the weighted rolling average for the given key.
Declaration
public bool TryGetWeightedAverage(string key, out QosStatsResult result)
Parameters
| Type |
Name |
Description |
| String |
key |
Key to identify the server (e.g. IP:port)
|
| QosStatsResult |
result |
The weighted rolling average for the given key. null if server not found.
|
Returns
| Type |
Description |
| Boolean |
true if the record was found, false otherwise
|