From 84fc240d001fbfb94740af47919e762465848800 Mon Sep 17 00:00:00 2001 From: vis2k Date: Thu, 23 Jan 2020 15:56:16 +0100 Subject: [PATCH] NetworkReaderTest: stopwatch not needed, Unity already shows the time --- Assets/Mirror/Tests/Editor/NetworkReaderTest.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Assets/Mirror/Tests/Editor/NetworkReaderTest.cs b/Assets/Mirror/Tests/Editor/NetworkReaderTest.cs index b735126f3..99d22e190 100644 --- a/Assets/Mirror/Tests/Editor/NetworkReaderTest.cs +++ b/Assets/Mirror/Tests/Editor/NetworkReaderTest.cs @@ -16,18 +16,14 @@ public class NetworkReaderTest public void Benchmark() { // 10 million reads, Unity 2019.3, code coverage disabled - // 4096ms (+GC later) + // 4049ms (+GC later) byte[] bytes = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C}; - Stopwatch watch = new Stopwatch(); - watch.Start(); for (int i = 0; i < 10000000; ++i) { ArraySegment segment = new ArraySegment(bytes); NetworkReader reader = new NetworkReader(segment); Vector3 value = reader.ReadVector3(); } - watch.Stop(); - Debug.Log("NetworkReaderTest Benchmark: " + watch.ElapsedMilliseconds + " ms"); } [Test]