-
Notifications
You must be signed in to change notification settings - Fork 450
fix: Only track one metric for scene sync and do not report scene name #1159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
m_NetworkManager.NetworkMetrics.TrackSceneEventSent( | ||
clientId, (uint)ClientSynchEventData.SceneEventType, ScenesInBuild[(int)sceneIndex], size); | ||
} | ||
clientId, (uint)ClientSynchEventData.SceneEventType, "", size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change also fixes an issue where the total size of the message is reported for each scene, which makes it look like multiple messages were sent at that size when it is in fact one message that is sent about multiple scenes. With this change, we only report one metric so the size is accurate.
clientId, (uint)SceneEventData.SceneEventType, ScenesInBuild[(int)SceneEventData.SceneIndex], stream.Length); | ||
} | ||
m_NetworkManager.NetworkMetrics.TrackSceneEventReceived( | ||
clientId, (uint)SceneEventData.SceneEventType, ScenesInBuild[(int)SceneEventData.SceneIndex], stream.Length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about the stream length? I feel like we had that issue at an earlier time and it was showing the full buffer size of the stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point I haven't encountered this issue before, but this is also how I think all the other metrics I've implemented are working. Can we get this merged and raise a tech debt ticket open to check for this issue everywhere?
…s/com.unity.multiplayer.mlapi into fix/scene-sync-metrics
…nsform * develop: fix: add `link.xml` to prevent IL2CPP stripping `Unity.PerformanceTesting` (#1172) chore: add boilerplate for `ClientNetworkTransform` sample (#1168) chore: remove `ClientNetworkVariable` (#1167) chore: Disable test while we reevaluate the assumption that INetworkM… (#1163) docs: rename Manual.md to Index.md Only track one metric for scene sync and do not report scene name (#1159) test: create job definitions for mobile build and test (#1152) test: make test runner scene ignored by default for BaseMultiInstanceTest (#1154) fix: remove left-over reference to SyncTransform (#1155) chore: remove unused SyncTransform.cs (#1153) chore!: remove NetworkNavMeshAgent (#1150) fix: NetworkObject parenting support in scene transitioning (#1148) chore!: rename Prototyping asmdef to Components (#1145) feat: add bootstrap sample to package (#1140) chore: remove `--yamato` param from `standards.py` (#1144) fix: MTT-504 connection approval messages and comparing networkconfig (#1138) refactor!: remove NetworkChannel and MultiplexTransportAdapter (#1133) # Conflicts: # com.unity.netcode.gameobjects/Components/Interpolator.meta # com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs # com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs.meta # testproject/Assets/Prefabs/PlayerCube.prefab
…ity-Technologies#1159) Previously we were tracking all scenes that were included in the message when an S2C_Sync message was sent or received. Now we have a better understanding of this scene event type, this feels like the wrong level of detail for this metric so we are now just reporting the scene event type and not the specific scenes. This will also make this metric consistent for C2S_SyncComplete where the scene names is not a core part of the message (the important thing is the event type itself and the number of network objects synced, not the scenes themselves). Similarly, S2C_Resync will not report each scene name, to keep consistent with the rest of the scene flow.
Previously we were tracking all scenes that were included in the message when an S2C_Sync message was sent or received. Now we have a better understanding of this scene event type, this feels like the wrong level of detail for this metric so we are now just reporting the scene event type and not the specific scenes.
This will also make this metric consistent for C2S_SyncComplete where the scene names is not a core part of the message (the important thing is the event type itself and the number of network objects synced, not the scenes themselves).
Similarly, S2C_Resync will not report each scene name, to keep consistent with the rest of the scene flow.