Skip to content

feat: Implement metrics for the new network profiler #960

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 66 commits into from
Aug 12, 2021

Conversation

becksebenius-unity
Copy link
Contributor

No description provided.

Benoit Doyon and others added 26 commits May 13, 2021 14:51
…ats-dispatcher

# Conflicts:
#	com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs
#	com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerMessageHandlerTests.cs
* Client Connection Ids and Game Object registration

* Fixing connection to use local and avoid allocation at every new metrics

* Fixed client id connections to point to other clients

* Using IReadOnlyCollection instead of explicit List

* Changing variable name to sender and receiver
…ics (#861)

* Add test for named message sent

* Add test for named messages sent to multiple clients

* Add test for named message received

* Revert editor changes

* Code review fixes

* Merge test fixes
* Add helper to wait for metric values in tests

* Use helper in other tests classes
* Add conditional define for the tools library

* Remove conditional define from test project
…spawned. (#930)

Create new object spawned/destroyed sent and received metrics.

Co-authored-by: Benoit Doyon <benoit.doyon@unity3d.com>
…tworkShow/Hide) (#935)

Make use of existing network object spawn destroy metrics individually for each network object, so that sent metrics mirror the received metrics, and to avoid allocations.

Co-authored-by: Benoit Doyon <benoit.doyon@unity3d.com>
@becksebenius-unity
Copy link
Contributor Author

Indicating approval from my end. Although I created the PR, Ben is now the owner and should do the merge.

@bendoyon bendoyon enabled auto-merge (squash) August 10, 2021 17:20
@bendoyon bendoyon disabled auto-merge August 10, 2021 19:31
becksebenius-unity and others added 11 commits August 10, 2021 15:46
* Removed the incorrect "on" in the pull request trigger name

* Fixed another place where I missed adding `project.`
# Conflicts:
#	com.unity.multiplayer.mlapi/Runtime/Core/NetworkObject.cs
…ithub branch protections (#1045)

* fix: pull request trigger name does not match the one configured in github branch protections

* Moved the old name to a "legacy" job so that the branch protected can be easily updated after merge
# Conflicts:
#	com.unity.netcode.gameobjects/Runtime/Metrics.meta
#	com.unity.netcode.gameobjects/Runtime/Metrics/BufferSizeCapture.cs
#	com.unity.netcode.gameobjects/Runtime/Metrics/BufferSizeCapture.cs.meta
#	com.unity.netcode.gameobjects/Runtime/Metrics/INetworkMetrics.cs
#	com.unity.netcode.gameobjects/Runtime/Metrics/INetworkMetrics.cs.meta
#	com.unity.netcode.gameobjects/Runtime/Metrics/NetworkMetrics.cs
#	com.unity.netcode.gameobjects/Runtime/Metrics/NetworkMetrics.cs.meta
#	com.unity.netcode.gameobjects/Runtime/Metrics/NullNetworkMetrics.cs
#	com.unity.netcode.gameobjects/Runtime/Metrics/NullNetworkMetrics.cs.meta
#	com.unity.netcode.gameobjects/Runtime/Metrics/StreamExtensions.cs
#	com.unity.netcode.gameobjects/Runtime/Metrics/StreamExtensions.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Messaging.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MessagingMetricsTests.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/MessagingMetricsTests.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjectMetricsTests.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObjects.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariableMetricsTests.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkVariables.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Ownership.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/OwnershipChangeMetricsTests.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RPC.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/RpcMetricsTests.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/ServerLogsMetricTests.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/MetricTestBase.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/MetricTestBase.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/NetworkVariableComponent.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/NetworkVariableComponent.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/RpcTestComponent.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/RpcTestComponent.cs.meta
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/WaitForMetricValues.cs
#	com.unity.netcode.gameobjects/Tests/Runtime/Metrics/Utility/WaitForMetricValues.cs.meta
…echnologies/com.unity.multiplayer.mlapi into experimental/netstats-dispatcher
@becksebenius-unity becksebenius-unity merged commit 6b58eeb into develop Aug 12, 2021
@becksebenius-unity becksebenius-unity deleted the experimental/netstats-dispatcher branch August 12, 2021 04:24
SamuelBellomo added a commit that referenced this pull request Aug 23, 2021
…nsform

* develop: (21 commits)
  test: adding more details to multiprocess readme (#1050)
  refactor!: convert NetworkTransform.NetworkState to `struct` (#1061)
  fix: networkmanager destroy on app quit (#1011)
  feat: snapshot, using unreliable packets, now that the underlying foundation supports it. Only merge after #1062 (#1064)
  feat: snapshot. Fully integrated despawn, mtt-1092, mtt-1056 (#1062)
  fix: eliminate bad use-after-free(destroy) pattern (#1068)
  chore: cleanup meta files for empty dirs (#1067)
  chore: minor MLAPI to Netcode rename (#1065)
  feat: report network behaviour name to the profiler (#1058)
  fix: player movement (#1063)
  test: Add unit tests for NetworkTime properties (#1053)
  chore: remove authority & netvar perms from NetworkTransform (#1059)
  feat: networktransform pos/rot/sca thresholds on state sync (#1055)
  feat: expose network behaviour type name internally (#1057)
  chore: remove all the old profiling code (#1048)
  fix: if-guard `NetworkManager.__rpc_name_table` access (#1056)
  fix: Disabling fixedupdate portion of SpawnRpcDespawn test because it's failing for known reasons that will be fixed in the IMessage refactor. (#1049)
  feat: Implement metrics for the new network profiler (#960)
  chore!: change package name & asmdefs (#1026)
  feat: per axis networktransform state sync (+bitwise state comp) (#1042)
  ...

# Conflicts:
#	com.unity.netcode.gameobjects/Prototyping/NetworkTransform.cs
mollstam pushed a commit to Keepsake-Games/com.unity.netcode.gameobjects that referenced this pull request Feb 13, 2023
…ies#960)

* Initial reference and NetworkMetrics

* Implement profiling decorator and network metrics for named messages

* Add dummy dispatch frame

* Move dispatch frame

* Move references

* Fix namespace reference

* Client Connection Ids and Game Object registration (Unity-Technologies#863)

* Client Connection Ids and Game Object registration

* Fixing connection to use local and avoid allocation at every new metrics

* Fixed client id connections to point to other clients

* Using IReadOnlyCollection instead of explicit List

* Changing variable name to sender and receiver

* feat: Add test for named message sent and named message received metrics (Unity-Technologies#861)

* Add test for named message sent

* Add test for named messages sent to multiple clients

* Add test for named message received

* Revert editor changes

* Code review fixes

* Merge test fixes

* feat: Add implementation and tests for unnamed message metrics (Unity-Technologies#866)

* Implement metrics for network variable deltas (Unity-Technologies#884)

* Removing duplicate

* Fix merge

* Merge fix

* Rename and move messaging metrics tests

* Fix merge errors

* Add helper to wait for metric values in tests (Unity-Technologies#896)

* Add helper to wait for metric values in tests

* Use helper in other tests classes

* Fail when metric values haven't been found

* Add conditional define for the tools library (Unity-Technologies#908)

* Add conditional define for the tools library

* Remove conditional define from test project

* feat: Report metrics when network objects are spawned or destroyed/despawned. (Unity-Technologies#930)

Create new object spawned/destroyed sent and received metrics.

Co-authored-by: Benoit Doyon <benoit.doyon@unity3d.com>

* chore: Compile out file when tool isn’t present (Unity-Technologies#953)

https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi

* feat: Add metrics for multiple objects spawned and destroyed (i.e. NetworkShow/Hide) (Unity-Technologies#935)

Make use of existing network object spawn destroy metrics individually for each network object, so that sent metrics mirror the received metrics, and to avoid allocations.

Co-authored-by: Benoit Doyon <benoit.doyon@unity3d.com>

* feat: RPC Event Net stat reporting (Unity-Technologies#954)

* RPC Event implementation with test

* Update based on comments

* Fixed RPC byte size

* Fix tests to use properly registered network prefabs (Unity-Technologies#962)

* Updated to match tools PR that decouples network profiler references (Unity-Technologies#961)

* Compilation fix

* Feat: Server logs metrics (Unity-Technologies#956)

* Experimental/netstats/review fixes (Unity-Technologies#970)

* Track ownership change events (Unity-Technologies#931)

* Move common metrics test initialization to utility class (Unity-Technologies#973)

* Assert byte counts for metrics (Unity-Technologies#975)

* Merge fixes

* Fix buffer size tracking

* Fix named message stream copyto

* Make network object tests use the base class

* test: added an empty test project that includes the tools package (Unity-Technologies#1016)

* Added a test project that references the tools package

* Reverted project.metafile change to try to diagnose a yamato failure

* trying a different format for the project name

* updated yamato files to avoid duplicate keys

* fixed triggers and 'run all' jobs not using new name or respecting validate flag

* re-added "test_" prefix to avoid too many changes to the structure in yamato

* fixed incorrect pack dependency for non-first projects

* Added utp to the integration project

* fixed package tests always using the first project

* Added a dummy asset to make sure that the test project assets folder is actually created

* Removed "packages" list from tools test project to simplify list

* fixed WaitForEndOfFrame issue

* Compiled out metrics tests when tools package isn't present

* Made sure all projects are tested from pull request even if they contain no packages

* changed test_editors to be project-specific

* fix mistake in previous

* Updated tools package testing to 0.0.1-preview.1

* missed updating the packages-lock.json in previous commit

* Code review fixes

* Code review fixes

* Code review fixes

* Code review fixes

* Force CI

* Revert "Force CI"

This reverts commit f0f4479.

* fix: updated some missed cases where test_editors was still used (Unity-Technologies#1039)

* Removed the incorrect "on" in the pull request trigger name

* Fixed another place where I missed adding `project.`

* Fixed ObjectDestroy metric not being sent when NetworkHide is used (Unity-Technologies#1041)

* Avoid string allocation when printing variable name by sanitizing on variable initialization (Unity-Technologies#1043)

* fix: pull request trigger name does not match the one configured in github branch protections (Unity-Technologies#1045)

* fix: pull request trigger name does not match the one configured in github branch protections

* Moved the old name to a "legacy" job so that the branch protected can be easily updated after merge

* fix: ported over the actual trigger data for the legacy trigger so it runs automatically (Unity-Technologies#1047)

* Fixing testproject-tools-integration failure

Co-authored-by: Benoit Doyon <benoit.doyon@unity3d.com>
Co-authored-by: Jean-Sébastien Fauteux <js.fauteux@unity3d.com>
Co-authored-by: Benoit Doyon <46577133+bendoyon@users.noreply.github.com>
Co-authored-by: josiemessa <josie@unity3d.com>
Co-authored-by: kvassall-unity <68920108+kvassall-unity@users.noreply.github.com>
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.

4 participants