[profiler_capture_api] minor memory usage rework pointed out in PR feedback

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-10-25 18:18:12 -07:00
parent c6d3e7900c
commit e38a44f061
2 changed files with 5 additions and 6 deletions
@@ -418,13 +418,12 @@ namespace Profiler
AZ::CVarFixedString captureOutput = static_cast<AZ::CVarFixedString>(AZ::Debug::bg_profilerCaptureLocation);
const AZStd::string frameDataFilePath = AZStd::string::format("%s/cpu_%s_%s.json", captureOutput.c_str(), nameHint, timeString.c_str());
const AZ::IO::FixedMaxPathString frameDataFilePath =
AZ::IO::FixedMaxPathString::format("%s/cpu_%s_%s.json", captureOutput.c_str(), nameHint, timeString.c_str());
char resolvedPath[AZ::IO::MaxPathLength];
AZ::IO::FileIOBase::GetInstance()->ResolvePath(frameDataFilePath.c_str(), resolvedPath, AZ::IO::MaxPathLength);
m_lastCapturedFilePath = resolvedPath;
AZ::IO::FileIOBase::GetInstance()->ResolvePath(m_lastCapturedFilePath, frameDataFilePath.c_str());
return frameDataFilePath;
return m_lastCapturedFilePath.String();
}
void ImGuiCpuProfiler::LoadFile()
+1 -1
View File
@@ -217,7 +217,7 @@ namespace Profiler
AZStd::vector<CpuTimingEntry> m_cpuTimingStatisticsWhenPause;
AZStd::sys_time_t m_frameToFrameTime{};
AZStd::string m_lastCapturedFilePath;
AZ::IO::FixedMaxPath m_lastCapturedFilePath;
bool m_showFilePicker = false;