Fixes #5909 hash file stats missing from AP stats log (#5913)

The "begin and end" markers were removed due to a merge conflict.  This restores them.
It also stops printing out sections that are empty - for example, if the AP runs without
processing anything, there will no longer be a "top 10 processed files" section.
Signed-off-by: lawsonamzn <70027408+lawsonamzn@users.noreply.github.com>
This commit is contained in:
Nicholas Lawson
2021-12-01 08:18:39 -08:00
committed by GitHub
parent 57d688fbc1
commit c492d644da
2 changed files with 10 additions and 0 deletions
@@ -1182,7 +1182,11 @@ namespace AssetUtilities
}
}
// keep track of how much time we spend actually hashing files.
AZStd::string statName = AZStd::string::format("HashFile,%s", filePath);
AssetProcessor::StatsCapture::BeginCaptureStat(statName.c_str());
hash = AssetBuilderSDK::GetFileHash(filePath, bytesReadOut, hashMsDelay);
AssetProcessor::StatsCapture::EndCaptureStat(statName.c_str());
return hash;
}