Skip to content

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

Merged
merged 5 commits into from
Sep 10, 2021

Conversation

josiemessa
Copy link
Contributor

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.

m_NetworkManager.NetworkMetrics.TrackSceneEventSent(
clientId, (uint)ClientSynchEventData.SceneEventType, ScenesInBuild[(int)sceneIndex], size);
}
clientId, (uint)ClientSynchEventData.SceneEventType, "", size);
Copy link
Contributor Author

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.

@josiemessa josiemessa changed the title Only track one metric for scene sync and do not report scene name Fix: Only track one metric for scene sync and do not report scene name Sep 9, 2021
@josiemessa josiemessa enabled auto-merge (squash) September 9, 2021 14:20
@josiemessa josiemessa changed the title Fix: Only track one metric for scene sync and do not report scene name fix: Only track one metric for scene sync and do not report scene name Sep 9, 2021
clientId, (uint)SceneEventData.SceneEventType, ScenesInBuild[(int)SceneEventData.SceneIndex], stream.Length);
}
m_NetworkManager.NetworkMetrics.TrackSceneEventReceived(
clientId, (uint)SceneEventData.SceneEventType, ScenesInBuild[(int)SceneEventData.SceneIndex], stream.Length);
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@josiemessa josiemessa merged commit ae16e8c into develop Sep 10, 2021
@josiemessa josiemessa deleted the fix/scene-sync-metrics branch September 10, 2021 07:45
SamuelBellomo added a commit that referenced this pull request Sep 13, 2021
…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
mollstam pushed a commit to Keepsake-Games/com.unity.netcode.gameobjects that referenced this pull request Feb 13, 2023
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants