Conversation
…ogies/com.unity.multiplayer.mlapi into feat/MTT-748-scene-metrics
| m_ServerLogReceivedEvent.Mark(new ServerLogEvent(new ConnectionInfo(senderClientId), (Unity.Multiplayer.MetricTypes.LogLevel)logType, bytesCount)); | ||
| } | ||
|
|
||
| public void TrackSceneEventSent(ulong[] receiverClientIds, uint sceneEventType, string sceneName, long bytesCount) |
There was a problem hiding this comment.
Will we have tests for this?
There was a problem hiding this comment.
Yes I've been digging into what I can do programmatically vs. need to do manually! I have manually verified they show up though, but next on the list is the tests.
There was a problem hiding this comment.
You might be able to reuse the tests that were written by the SDK team if there are.
There was a problem hiding this comment.
Yes that's what I'm looking at, as there's both programmatic and manual tests so need to see what's being tested in which.
| foreach (var sceneIndex in SceneEventData.ScenesToSynchronize) | ||
| { | ||
| m_NetworkManager.NetworkMetrics.TrackSceneEventReceived( | ||
| clientId, (uint) SceneEventData.SceneEventType, GetSceneNameFromNetcodeSceneIndex(sceneIndex), stream.Length); |
There was a problem hiding this comment.
I see why this was a point of discussion. In the profiler this might appear that stream.Length was sent for each scene, instead of the reality where stream.Length encompasses all scenes which are represented as separate events.
I'm wondering if maybe for this case it would be better to omit the scene name and include something like "N/A" instead of sending an event for all scenes? That would seem to be more accurate, although it would remove the utility of seeing which scenes were included - do you think there's a user need for that in this event?
There was a problem hiding this comment.
Ah yeah that slipped my mind, do we have the same problem where we're doing this in other places (i.e. a message being sent about multiple things in one message but is split up for metrics)?
There was a problem hiding this comment.
Ah I remembered what the plan was - the idea was to reconstruct this into a "combined" metric on the formatting side (i.e. one metric event for all the scenes). Not ideal as the original metric is still reporting the combined size though. I also am not sure the best way to display this in the profiler either.
| m_ServerLogReceivedEvent.Mark(new ServerLogEvent(new ConnectionInfo(senderClientId), (Unity.Multiplayer.MetricTypes.LogLevel)logType, bytesCount)); | ||
| } | ||
|
|
||
| public void TrackSceneEventSent(ulong[] receiverClientIds, uint sceneEventType, string sceneName, long bytesCount) |
There was a problem hiding this comment.
You might be able to reuse the tests that were written by the SDK team if there are.
com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs
Outdated
Show resolved
Hide resolved
…nsform * develop: (26 commits) fix: client connected InvokeOnClientConnectedCallback with scene management disabled (#1123) fix: removed `public` class `NetcodeObserver` (MTT-1157) (#1122) feat: add NetworkMessageSent/Received metrics (#1112) feat: snapshot. MTU sizing option for Snapshot. MTT-1087 (#1111) Add metrics for transport bytes sent and received (#1104) fix: Missing end profiling sample (#1118) chore: support standalone mode for netcode runtimetests (#1115) feat: Change MetricNames for a more complex value type (#1109) feat: Track scene event metrics (#1089) style: whitespace fixes (#1117) feat: replace scene registration with scenes in build list (#1080) fix: mtt-857 GitHub issue 915 (#1099) fix: NetworkSceneManager exception when DontDestroyOnLoad NetworkObjects are being synchronized (#1090) feat: NetworkTransform Custom Editor Inspector UI (#1101) refactor: remove TempGlobalObjectIdHashOverride (#1105) fix: MTT-1124 Counters are now reported in sync with other metrics (#1096) refactor: convert using var statements to using var declarations (#1100) chore: updated all of the namespaces to match the tools package change (#1095) refactor!: remove network variable settings, network behaviour cleanup (#1097) fix: mtt-1088 review. Safer handling of out-of-order or old messages (#1091) ... # Conflicts: # com.unity.netcode.gameobjects/Prototyping/NetworkTransform.cs
Track when scene event messages are sent and received.