Struct SnapshotPacketLossStatistics
Added to NetworkMetrics, stores snapshot related loss calculated via GhostReceiveSystem.
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct SnapshotPacketLossStatistics
Remarks
Very similar approach to Unity.Networking.Transport.UnreliableSequencedPipelineStage.Statistics.
Fields
NumPacketsCulledAsArrivedOnSameFrame
The Netcode package can only process one snapshot per render frame. If 2+ arrive on the same frame, we'll clobber one of them without processing it.
Declaration
public ulong NumPacketsCulledAsArrivedOnSameFrame
Field Value
| Type | Description |
|---|---|
| ulong |
Remarks
This is also called a "Packet Burst".
NumPacketsCulledOutOfOrder
Counts the number of snapshot packets dropped (i.e. "culled") due to invalid SequenceId. I.e. Implies the packet arrived, but out of order.
Declaration
public ulong NumPacketsCulledOutOfOrder
Field Value
| Type | Description |
|---|---|
| ulong |
NumPacketsDroppedNeverArrived
Detects gaps in CurrentSnapshotSequenceId to determine real packet loss.
Declaration
public ulong NumPacketsDroppedNeverArrived
Field Value
| Type | Description |
|---|---|
| ulong |
NumPacketsReceived
Count of snapshot packets received - on the client - from the server.
Declaration
public ulong NumPacketsReceived
Field Value
| Type | Description |
|---|---|
| ulong |
Properties
ArrivedOnTheSameFrameClobberedPacketLossPercent
Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are culled due to arriving on the same frame as another snapshot.
Declaration
public double ArrivedOnTheSameFrameClobberedPacketLossPercent { get; }
Property Value
| Type | Description |
|---|---|
| double |
CombinedPacketLossCount
Count of packets lost in some form.
Declaration
public ulong CombinedPacketLossCount { get; }
Property Value
| Type | Description |
|---|---|
| ulong |
CombinedPacketLossPercent
Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are dropped (for any reason).
Declaration
public double CombinedPacketLossPercent { get; }
Property Value
| Type | Description |
|---|---|
| double |
NetworkPacketLossPercent
Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are lost due to network-caused packet loss.
Declaration
public double NetworkPacketLossPercent { get; }
Property Value
| Type | Description |
|---|---|
| double |
OutOfOrderPacketLossPercent
Percentage of all snapshot packets - that we assume must have been sent to us (based on SequenceId) - which are lost due to arriving out of order (and thus being culled).
Declaration
public double OutOfOrderPacketLossPercent { get; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
ToFixedString()
Dumps all the statistic info.
Declaration
public FixedString512Bytes ToFixedString()
Returns
| Type | Description |
|---|---|
| FixedString512Bytes | Dumps all the statistic info. |
Operators
operator +(SnapshotPacketLossStatistics, SnapshotPacketLossStatistics)
Declaration
public static SnapshotPacketLossStatistics operator +(SnapshotPacketLossStatistics a, SnapshotPacketLossStatistics b)
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotPacketLossStatistics | a | |
| SnapshotPacketLossStatistics | b |
Returns
| Type | Description |
|---|---|
| SnapshotPacketLossStatistics |
operator -(SnapshotPacketLossStatistics, SnapshotPacketLossStatistics)
Declaration
public static SnapshotPacketLossStatistics operator -(SnapshotPacketLossStatistics a, SnapshotPacketLossStatistics b)
Parameters
| Type | Name | Description |
|---|---|---|
| SnapshotPacketLossStatistics | a | |
| SnapshotPacketLossStatistics | b |
Returns
| Type | Description |
|---|---|
| SnapshotPacketLossStatistics |