[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:
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user