10k Benchmark removed because it's 2D, outdated and insignificant

This commit is contained in:
vis2k 2020-07-30 19:23:25 +02:00
parent 6f645c870c
commit 7de5400ad5
30 changed files with 0 additions and 946259 deletions

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9e41ff9a555fe4ae6a036b2c526b1a7d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 4734563653837413dacda7df519aac42
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,113 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3400642863864710990
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4762060620421768246}
- component: {fileID: 8942558611080938647}
- component: {fileID: 526357532670440777}
- component: {fileID: 2278920908044998071}
m_Layer: 0
m_Name: Monster
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4762060620421768246
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3400642863864710990}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.514, y: 0.974, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &8942558611080938647
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3400642863864710990}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
m_Sprite: {fileID: 21300062, guid: c862ec58257e74625b59a5f2bb18ace7, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &526357532670440777
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3400642863864710990}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
m_Name:
m_EditorClassIdentifier:
sceneId: 0
serverOnly: 0
m_AssetId: 02f33789c3e48486a96fb1923c81be06
--- !u!114 &2278920908044998071
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3400642863864710990}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd59972fb11d348209c78007b795e48c, type: 3}
m_Name:
m_EditorClassIdentifier:
syncMode: 0
syncInterval: 0.1
health: 10

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 02f33789c3e48486a96fb1923c81be06
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,97 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6267711181680959734
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6267711181680959736}
- component: {fileID: 6267711181680959735}
- component: {fileID: 73878422525288218}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6267711181680959736
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6267711181680959734}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &6267711181680959735
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6267711181680959734}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_Sprite: {fileID: 21301702, guid: c862ec58257e74625b59a5f2bb18ace7, type: 3}
m_Color: {r: 1, g: 0.989954, b: 0, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &73878422525288218
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6267711181680959734}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3}
m_Name:
m_EditorClassIdentifier:
sceneId: 0
serverOnly: 0
m_AssetId: 82ea0e1a4f3c84ef197e19b44c096865

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 82ea0e1a4f3c84ef197e19b44c096865
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e3398ae94fdb24e95827ea7365ac04d1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: b7f6c3db178354389a4c346da8619b10
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: c827971c8a1d7495a8154443c973a7fb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,24 +0,0 @@
using System;
namespace Mirror.Examples
{
public class BenchmarkNetworkManager : NetworkManager
{
/// <summary>
/// hook for benchmarking
/// </summary>
public Action BeforeLateUpdate;
/// <summary>
/// hook for benchmarking
/// </summary>
public Action AfterLateUpdate;
public override void LateUpdate()
{
BeforeLateUpdate?.Invoke();
base.LateUpdate();
AfterLateUpdate?.Invoke();
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 30267752aaf3a68419dac343faaf0bb9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,13 +0,0 @@
namespace Mirror.Examples
{
public class Health : NetworkBehaviour
{
[SyncVar] public int health = 10;
[ServerCallback]
public void Update()
{
health = (health + 1) % 10;
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: bd59972fb11d348209c78007b795e48c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 45dbc8faf5faa4c67b04663735a81703
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: da3eacab5467b4a83995b3982d476d55
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,23 +0,0 @@
1-Bit Pack
Created/distributed by Kenney (www.kenney.nl)
Creation date: 06-05-2019
------------------------------
License: (Creative Commons Zero, CC0)
http://creativecommons.org/publicdomain/zero/1.0/
This content is free to use in personal, educational and commercial projects.
Support us by crediting Kenney or www.kenney.nl (this is not mandatory)
------------------------------
Donate: http://support.kenney.nl
Request: http://request.kenney.nl
Patreon: http://patreon.com/kenney/
Follow on Twitter for updates:
http://twitter.com/KenneyNL

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 06bc57f8b78814a7bbed13c0b73735c9
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 41918ba282c7645868c0558050902b93
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,206 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2639667209587252926
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8491650903855696015}
- component: {fileID: 838131898769989473}
- component: {fileID: 4884534417752594218}
m_Layer: 31
m_Name: Layer1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8491650903855696015
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2639667209587252926}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4007533289218549016}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1839735485 &838131898769989473
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2639667209587252926}
m_Enabled: 1
m_Tiles:
- first: {x: -1, y: 0, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 6520c4c07396d487197565da07cd0b87, type: 2}
m_TileSpriteArray:
- m_RefCount: 1
m_Data: {fileID: 21300000, guid: 9ba453ff7c6124209b57da4cd176d458, type: 3}
m_TileMatrixArray:
- m_RefCount: 1
m_Data:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 1
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: -1, y: 0, z: 0}
m_Size: {x: 1, y: 1, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
--- !u!483693784 &4884534417752594218
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2639667209587252926}
m_Enabled: 0
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16
m_MaxFrameAge: 16
m_SortOrder: 0
m_Mode: 0
m_DetectChunkCullingBounds: 0
m_MaskInteraction: 0
--- !u!1 &8691465686236020699
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4007533289218549016}
- component: {fileID: 4303131663742094648}
m_Layer: 31
m_Name: 1bit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4007533289218549016
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8691465686236020699}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8491650903855696015}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!156049354 &4303131663742094648
Grid:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8691465686236020699}
m_Enabled: 1
m_CellSize: {x: 1, y: 1, z: 0}
m_CellGap: {x: 0, y: 0, z: 0}
m_CellLayout: 0
m_CellSwizzle: 0
--- !u!114 &114120228021903848
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12395, guid: 0000000000000000e000000000000000, type: 0}
m_Name: Palette Settings
m_EditorClassIdentifier:
cellSizing: 0

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 169db42be8ceb4fa4a160e4a6961d401
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9cd9577848a114c8e97389b97d50b3eb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,36 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 13312, guid: 0000000000000000e000000000000000, type: 0}
m_Name: empty
m_EditorClassIdentifier:
m_Sprite: {fileID: 21300000, guid: 9ba453ff7c6124209b57da4cd176d458, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Transform:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_InstancedGameObject: {fileID: 0}
m_Flags: 1
m_ColliderType: 0

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 6520c4c07396d487197565da07cd0b87
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,140 +0,0 @@
#if !UNITY_2019_2_OR_NEWER || UNITY_PERFORMANCE_TESTS_1_OR_OLDER
using System.Collections;
using System.Diagnostics;
using Mirror.Examples;
using NUnit.Framework;
using Unity.PerformanceTesting;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.TestTools;
namespace Mirror.Tests.Performance.Runtime
{
[Category("Performance")]
[Category("Benchmark")]
public class BenchmarkPerformance
{
const string ScenePath = "Assets/Mirror/Examples/Benchmarks/10k/Scenes/Scene.unity";
const float Warmup = 1f;
const int MeasureCount = 120;
readonly SampleGroupDefinition NetworkManagerSample = new SampleGroupDefinition("NetworkManagerLateUpdate", SampleUnit.Millisecond, AggregationType.Average);
readonly Stopwatch stopwatch = new Stopwatch();
bool captureMeasurement;
void BeforeLateUpdate()
{
if (!captureMeasurement)
return;
stopwatch.Start();
}
void AfterLateUpdate()
{
if (!captureMeasurement)
return;
stopwatch.Stop();
double time = stopwatch.Elapsed.TotalMilliseconds;
Measure.Custom(NetworkManagerSample, time);
stopwatch.Reset();
}
[UnitySetUp]
public IEnumerator SetUp()
{
captureMeasurement = false;
// load scene
yield return EditorSceneManager.LoadSceneAsyncInPlayMode(ScenePath, new LoadSceneParameters { loadSceneMode = LoadSceneMode.Additive });
Scene scene = SceneManager.GetSceneByPath(ScenePath);
SceneManager.SetActiveScene(scene);
// wait for NetworkManager awake
yield return null;
// load host
NetworkManager.singleton.StartHost();
BenchmarkNetworkManager benchmarker = NetworkManager.singleton as BenchmarkNetworkManager;
if (benchmarker == null)
{
Assert.Fail("Could not find Benchmarker");
yield break;
}
benchmarker.BeforeLateUpdate = BeforeLateUpdate;
benchmarker.AfterLateUpdate = AfterLateUpdate;
}
IEnumerator RunBenchmark()
{
// warmup
yield return new WaitForSecondsRealtime(Warmup);
// run benchmark
// capture frames and LateUpdate time
captureMeasurement = true;
yield return Measure.Frames().MeasurementCount(MeasureCount).Run();
captureMeasurement = false;
}
[UnityTearDown]
public IEnumerator TearDown()
{
// shutdown
GameObject go = NetworkManager.singleton.gameObject;
NetworkManager.Shutdown();
// unload scene
Scene scene = SceneManager.GetSceneByPath(ScenePath);
yield return SceneManager.UnloadSceneAsync(scene);
// we must destroy networkmanager because it is marked as DontDestroyOnLoad
if (go != null)
{
UnityEngine.Object.Destroy(go);
}
}
static void EnableHealth(bool value)
{
Health[] all = Health.FindObjectsOfType<Health>();
foreach (Health health in all)
{
health.enabled = value;
}
}
[UnityTest]
#if UNITY_2019_2_OR_NEWER
[Performance]
#else
[PerformanceUnityTest]
#endif
public IEnumerator Benchmark10k()
{
EnableHealth(true);
yield return RunBenchmark();
}
[UnityTest]
#if UNITY_2019_2_OR_NEWER
[Performance]
#else
[PerformanceUnityTest]
#endif
public IEnumerator Benchmark10kIdle()
{
EnableHealth(false);
yield return RunBenchmark();
}
}
}
#endif

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: ae7696becbe164441b0402b40e9cbd61
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: