[atom_cpu_profiler_gem_promotion] removed unnecessary GatherCpuTimingStatistics flag from Atom

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-10-14 14:14:42 -07:00
parent b6764a3b27
commit 9a5ac0a35a
3 changed files with 4 additions and 14 deletions
@@ -66,9 +66,6 @@ namespace AZ
{
None = 0,
//! Enables gathering of cpu timing statistics.
GatherCpuTimingStatistics = AZ_BIT(0),
//! Enables gathering of transient attachment statistics.
GatherTransientAttachmentStatistics = AZ_BIT(2),
@@ -602,14 +602,11 @@ namespace AZ
double FrameScheduler::GetCpuFrameTime() const
{
if (CheckBitsAny(m_compileRequest.m_statisticsFlags, FrameSchedulerStatisticsFlags::GatherCpuTimingStatistics))
if (auto statsProfiler = AZ::Interface<AZ::Statistics::StatisticalProfilerProxy>::Get(); statsProfiler)
{
if (auto statsProfiler = AZ::Interface<AZ::Statistics::StatisticalProfilerProxy>::Get(); statsProfiler)
{
auto& rhiMetrics = statsProfiler->GetProfiler(rhiMetricsId);
const auto* frameTimeStat = rhiMetrics.GetStatistic(frameTimeMetricId);
return (frameTimeStat->GetMostRecentSample() * 1000) / aznumeric_cast<double>(AZStd::GetTimeTicksPerSecond());
}
auto& rhiMetrics = statsProfiler->GetProfiler(rhiMetricsId);
const auto* frameTimeStat = rhiMetrics.GetStatistic(frameTimeMetricId);
return (frameTimeStat->GetMostRecentSample() * 1000) / aznumeric_cast<double>(AZStd::GetTimeTicksPerSecond());
}
return 0;
}
@@ -65,10 +65,6 @@ namespace MaterialEditor
AZ_Error("PerformanceMonitorComponent", false, "Failed to find root pass.");
}
AZ::RHI::RHISystemInterface::Get()->ModifyFrameSchedulerStatisticsFlags(
AZ::RHI::FrameSchedulerStatisticsFlags::GatherCpuTimingStatistics,
enabled);
if (enabled)
{
ResetStats();