From be7da82cfc8c91c76c88fdb5a094875e875101a5 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 3 Apr 2023 18:26:17 +0200 Subject: [PATCH] Add printing output C# files size in game cooker --- Source/Editor/Cooker/Steps/PostProcessStep.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/Editor/Cooker/Steps/PostProcessStep.cpp b/Source/Editor/Cooker/Steps/PostProcessStep.cpp index b79eed03d..dce8c5d2f 100644 --- a/Source/Editor/Cooker/Steps/PostProcessStep.cpp +++ b/Source/Editor/Cooker/Steps/PostProcessStep.cpp @@ -2,9 +2,20 @@ #include "PostProcessStep.h" #include "Editor/Cooker/PlatformTools.h" +#include "Engine/Platform/FileSystem.h" bool PostProcessStep::Perform(CookingData& data) { + // Print .NET stats + const DotNetAOTModes aotMode = data.Tools->UseAOT(); + uint64 outputSize = FileSystem::GetDirectorySize(data.DataOutputPath / TEXT("Dotnet")); + if (aotMode == DotNetAOTModes::None) + { + for (auto& binaryModule : data.BinaryModules) + outputSize += FileSystem::GetFileSize(data.DataOutputPath / binaryModule.ManagedPath); + } + LOG(Info, "Output .NET files size: {0} MB", (uint32)(outputSize / (1024ull * 1024))); + GameCooker::PostProcessFiles(); return data.Tools->OnPostProcess(data); }