diff --git a/framework/stats/hwcpipe_stats_provider.cpp b/framework/stats/hwcpipe_stats_provider.cpp index 4ea770dbd..0d0775a6d 100644 --- a/framework/stats/hwcpipe_stats_provider.cpp +++ b/framework/stats/hwcpipe_stats_provider.cpp @@ -138,11 +138,11 @@ HWCPipeStatsProvider::HWCPipeStatsProvider(std::set &requested_stats) requested_stats.erase(iter.first); } - requested_stats_count = requested_stats.size(); + stat_data_count = stat_data.size(); sampler = std::make_unique>(config); - if (requested_stats_count > 0) + if (stat_data_count > 0) { ec = sampler->start_sampling(); if (ec) @@ -156,7 +156,7 @@ HWCPipeStatsProvider::~HWCPipeStatsProvider() { std::error_code ec; - if (requested_stats_count > 0) + if (stat_data_count > 0) { ec = sampler->stop_sampling(); if (ec) @@ -204,7 +204,7 @@ StatsProvider::Counters HWCPipeStatsProvider::sample(float delta_time) { Counters res; - if (requested_stats_count < 1) + if (stat_data_count < 1) { return res; } diff --git a/framework/stats/hwcpipe_stats_provider.h b/framework/stats/hwcpipe_stats_provider.h index 00a470222..7767b2ab0 100644 --- a/framework/stats/hwcpipe_stats_provider.h +++ b/framework/stats/hwcpipe_stats_provider.h @@ -91,7 +91,7 @@ class HWCPipeStatsProvider : public StatsProvider private: std::unique_ptr> sampler; - size_t requested_stats_count{0}; + size_t stat_data_count{0}; // Only stats which are available and were requested end up in stat_data StatDataMap stat_data;