com.unity.ucg.qos 0.2.0-preview
PreviewNotes: processedReleased September 11, 2020
Download Options
Direct package downloads captured from Unity's package registry.
Unity Compatibility
Minimum Unity: 2019.3
Package Dependencies
Features
- QosResult.AddAggregateLatency() replaces QosResult.AverageLatencyMs to generate the aggregate sum of all latencies that is used to compute the average. Instead of directly adding to QosResult.AverageLatencyMs, call QosResult.AddAggregateLatency.
Improvements
- Average latency when no responses have been received changed from 0 to QosResult.InvalidLatencyValue (which is uint.MaxValue) so sorting by latency does not make invalid results appear first.
- Packet loss when no requests have been sent changed from 0.0f to QosResult.InvalidPacketLossValue (which is float.MaxValue) so sorting by packet loss does not make invalid results appear first.
- QosStats.AddResult() renamed to QosStats.ProcessResult(). Additionally, calling QosStats.ProcessResult() with QosResult.AverageLatencyMs == QosResult.InvalidLatencyValue or QosResult.PacketLoss == QosResult.InvalidPacketLossValue will remove the server from stats-tracking since an invalid latency or packet loss indicates a server that is not currently reachable. Adding a valid result will again start tracking the server's results.
- QosResult.AverageLatencyMs is now read-only and is computed when accessed.
- QosResult.PacketLoss is now read-only and is computed when accessed.
- Some methods that have an out parameter will now set that parameter to null if it returns false (instead of using a default value). This affects QosStats.TryGetWeightedAverage(), QosStats.TryGetAllResults(), and WeightedMovingAverage.AllResults().
- WeightedMovingAverage.AllResults() now returns results ordered newest-to-oldest.
- QosStats.TryGetAllResults() now returns results ordered newest-to-oldest.
- com.unity.collections dependency updated to 0.9.0-preview.6.
- ### Deprecated
- QosStatsResult.IsValid() is deprecated. It is no longer possible to submit an invalid QosResult to QosStats, so having a validity check is unnecessary.
- QosStats.AddResult() is deprecated. It will call QosStats.ProcessResult() for the nonce.
API Changes
- QosResult.Update() removed. Average latency and packet loss are now computed on access.
Bug Fixes
- It is no longer possible to add invalid results to QosStats.
