Add various profiler events to analyze models importing workflow

This commit is contained in:
Wojtek Figat
2023-12-03 11:23:45 +01:00
parent 022a69aaf2
commit 1843689a88
8 changed files with 38 additions and 6 deletions

View File

@@ -444,6 +444,8 @@ void RemoveNamespace(String& name)
bool ModelTool::ImportData(const String& path, ModelData& data, Options& options, String& errorMsg)
{
PROFILE_CPU();
// Validate options
options.Scale = Math::Clamp(options.Scale, 0.0001f, 100000.0f);
options.SmoothingNormalsAngle = Math::Clamp(options.SmoothingNormalsAngle, 0.0f, 175.0f);
@@ -782,6 +784,7 @@ String GetAdditionalImportPath(const String& autoImportOutput, Array<String>& im
bool ModelTool::ImportModel(const String& path, ModelData& data, Options& options, String& errorMsg, const String& autoImportOutput)
{
PROFILE_CPU();
LOG(Info, "Importing model from \'{0}\'", path);
const auto startTime = DateTime::NowUTC();