Skip to content

Commit 833f1fa

Browse files
test: Perf tests part 2. Adding Test Coordinator and base test class (#923)
Adding test coordinator. This is the central communication coordinator for multiprocess tests. Test runner will have a test coordinator that will act as a server. Tests will create new processes that will also have TestCoordinators. TestCoordinators in these players will automatically connect as a client to the test runner. Each test can trigger client RPCs from the test runner (server) through the TestCoordinator to execute actions relevant to the perf test. Clients will send test results to the test runner using server RPCs. This is further abstracted in Part 3 of this PR with ExecuteStepInContext. To execute these, use the "Run Selected Tests (-your platform-)" button in editor to execute these tests in separate player locally. That separate player will trigger subsequent process creation. Each child process will self destroy if idle for too long, making sure we're not leaving process alive for ever.
1 parent b2209c2 commit 833f1fa

17 files changed

+1659
-1
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1 &5637023994061915634
4+
GameObject:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
serializedVersion: 6
10+
m_Component:
11+
- component: {fileID: 5637023994061915632}
12+
- component: {fileID: 5637023994061915633}
13+
m_Layer: 0
14+
m_Name: PerfTestNetworkObject
15+
m_TagString: Untagged
16+
m_Icon: {fileID: 0}
17+
m_NavMeshLayer: 0
18+
m_StaticEditorFlags: 0
19+
m_IsActive: 1
20+
--- !u!4 &5637023994061915632
21+
Transform:
22+
m_ObjectHideFlags: 0
23+
m_CorrespondingSourceObject: {fileID: 0}
24+
m_PrefabInstance: {fileID: 0}
25+
m_PrefabAsset: {fileID: 0}
26+
m_GameObject: {fileID: 5637023994061915634}
27+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
28+
m_LocalPosition: {x: 0, y: 0, z: 0}
29+
m_LocalScale: {x: 1, y: 1, z: 1}
30+
m_Children: []
31+
m_Father: {fileID: 0}
32+
m_RootOrder: 0
33+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
34+
--- !u!114 &5637023994061915633
35+
MonoBehaviour:
36+
m_ObjectHideFlags: 0
37+
m_CorrespondingSourceObject: {fileID: 0}
38+
m_PrefabInstance: {fileID: 0}
39+
m_PrefabAsset: {fileID: 0}
40+
m_GameObject: {fileID: 5637023994061915634}
41+
m_Enabled: 1
42+
m_EditorHideFlags: 0
43+
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
44+
m_Name:
45+
m_EditorClassIdentifier:
46+
GlobalObjectIdHash: 951099334
47+
AlwaysReplicateAsRoot: 0
48+
DontDestroyWithOwner: 0
49+
AutoObjectParentSync: 1

testproject/Assets/Prefabs/PerfTestNetworkObject.prefab.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!1 &9115731988109684252
4+
GameObject:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
serializedVersion: 6
10+
m_Component:
11+
- component: {fileID: 9115731988109684241}
12+
- component: {fileID: 9115731988109684240}
13+
- component: {fileID: 9115731988109684243}
14+
- component: {fileID: 9115731988109684253}
15+
m_Layer: 0
16+
m_Name: PerfTestVisualNetworkObject
17+
m_TagString: Untagged
18+
m_Icon: {fileID: 0}
19+
m_NavMeshLayer: 0
20+
m_StaticEditorFlags: 0
21+
m_IsActive: 1
22+
--- !u!4 &9115731988109684241
23+
Transform:
24+
m_ObjectHideFlags: 0
25+
m_CorrespondingSourceObject: {fileID: 0}
26+
m_PrefabInstance: {fileID: 0}
27+
m_PrefabAsset: {fileID: 0}
28+
m_GameObject: {fileID: 9115731988109684252}
29+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
30+
m_LocalPosition: {x: 0, y: 0, z: 0}
31+
m_LocalScale: {x: 1, y: 1, z: 1}
32+
m_Children: []
33+
m_Father: {fileID: 0}
34+
m_RootOrder: 0
35+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
36+
--- !u!33 &9115731988109684240
37+
MeshFilter:
38+
m_ObjectHideFlags: 0
39+
m_CorrespondingSourceObject: {fileID: 0}
40+
m_PrefabInstance: {fileID: 0}
41+
m_PrefabAsset: {fileID: 0}
42+
m_GameObject: {fileID: 9115731988109684252}
43+
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
44+
--- !u!23 &9115731988109684243
45+
MeshRenderer:
46+
m_ObjectHideFlags: 0
47+
m_CorrespondingSourceObject: {fileID: 0}
48+
m_PrefabInstance: {fileID: 0}
49+
m_PrefabAsset: {fileID: 0}
50+
m_GameObject: {fileID: 9115731988109684252}
51+
m_Enabled: 1
52+
m_CastShadows: 1
53+
m_ReceiveShadows: 1
54+
m_DynamicOccludee: 1
55+
m_StaticShadowCaster: 0
56+
m_MotionVectors: 1
57+
m_LightProbeUsage: 1
58+
m_ReflectionProbeUsage: 1
59+
m_RayTracingMode: 2
60+
m_RayTraceProcedural: 0
61+
m_RenderingLayerMask: 1
62+
m_RendererPriority: 0
63+
m_Materials:
64+
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
65+
m_StaticBatchInfo:
66+
firstSubMesh: 0
67+
subMeshCount: 0
68+
m_StaticBatchRoot: {fileID: 0}
69+
m_ProbeAnchor: {fileID: 0}
70+
m_LightProbeVolumeOverride: {fileID: 0}
71+
m_ScaleInLightmap: 1
72+
m_ReceiveGI: 1
73+
m_PreserveUVs: 0
74+
m_IgnoreNormalsForChartDetection: 0
75+
m_ImportantGI: 0
76+
m_StitchLightmapSeams: 1
77+
m_SelectedEditorRenderState: 3
78+
m_MinimumChartSize: 4
79+
m_AutoUVMaxDistance: 0.5
80+
m_AutoUVMaxAngle: 89
81+
m_LightmapParameters: {fileID: 0}
82+
m_SortingLayerID: 0
83+
m_SortingLayer: 0
84+
m_SortingOrder: 0
85+
m_AdditionalVertexStreams: {fileID: 0}
86+
--- !u!114 &9115731988109684253
87+
MonoBehaviour:
88+
m_ObjectHideFlags: 0
89+
m_CorrespondingSourceObject: {fileID: 0}
90+
m_PrefabInstance: {fileID: 0}
91+
m_PrefabAsset: {fileID: 0}
92+
m_GameObject: {fileID: 9115731988109684252}
93+
m_Enabled: 1
94+
m_EditorHideFlags: 0
95+
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
96+
m_Name:
97+
m_EditorClassIdentifier:
98+
GlobalObjectIdHash: 951099334
99+
AlwaysReplicateAsRoot: 0
100+
DontDestroyWithOwner: 0

testproject/Assets/Prefabs/PerfTestVisualNetworkObject.prefab.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)