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>
monroegm-disable-blank-issue-2
Nicholas Lawson 4 years ago committed by GitHub
parent 57d688fbc1
commit c492d644da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -132,6 +132,12 @@ namespace AssetProcessor
// calls PrintStat on each element in the vector.
void PrintStatsArray(AZStd::vector<AZStd::string>& keys, int maxToPrint, const char* header)
{
// don't print anything out at all, not even a header, if the keys are empty.
if (keys.empty())
{
return;
}
if ((m_dumpHumanReadableStats)&&(header))
{
AZ_TracePrintf(AssetProcessor::ConsoleChannel,"Top %i %s\n", maxToPrint, header);

@ -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;
}

Loading…
Cancel
Save