From e213b3ea262d9950dd6636d5597ea11fe639c645 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Mon, 26 Aug 2024 13:25:06 +0100 Subject: [PATCH] Add some basic timings --- project/code/TMV/Mission.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/project/code/TMV/Mission.cs b/project/code/TMV/Mission.cs index 5b586ed..609a9ae 100644 --- a/project/code/TMV/Mission.cs +++ b/project/code/TMV/Mission.cs @@ -100,10 +100,11 @@ public partial class Mission : Node3D ClearMap(); _textureLoader = new TextureLoader(_campaignName); - _file = new(FileName); - UseChunk("TXLIST", LoadTextures); - UseChunk("WREXT", BuildWrMeshes); + Timing.TimeStage("DbFile Parse", () => _file = new(FileName)); + Timing.TimeStage("Load FAM", () => UseChunk("TXLIST", LoadTextures)); + Timing.TimeStage("Build WR", () => UseChunk("WREXT", BuildWrMeshes)); + // TODO: Sort this out so I can time it lol ObjectHierarchy objHierarchy; if (_file.Chunks.TryGetValue("GAM_FILE", out var gamFileChunk)) { @@ -127,7 +128,7 @@ public partial class Mission : Node3D if (_file.Chunks.TryGetValue("BRLIST", out var brList)) { - PlaceObjects((BrList)brList, objHierarchy); + Timing.TimeStage("Object Placement", () => PlaceObjects((BrList)brList, objHierarchy)); } }