msharee9 commented on a change in pull request #743: Minificpp 1169 - Simplify C2 metrics collection and reporting URL: https://github.com/apache/nifi-minifi-cpp/pull/743#discussion_r390615024
########## File path: libminifi/include/FlowController.h ########## @@ -406,22 +409,27 @@ class FlowController : public core::controller::ControllerServiceProvider, publi std::chrono::steady_clock::time_point start_time_; - std::mutex metrics_mutex_; + mutable std::mutex metrics_mutex_; // root_nodes cache std::map<std::string, std::shared_ptr<state::response::ResponseNode>> root_response_nodes_; + // metrics cache std::map<std::string, std::shared_ptr<state::response::ResponseNode>> device_information_; // metrics cache std::map<std::string, std::shared_ptr<state::response::ResponseNode>> component_metrics_; std::map<uint8_t, std::vector<std::shared_ptr<state::response::ResponseNode>>> component_metrics_by_id_; + // metrics last run std::chrono::steady_clock::time_point last_metrics_capture_; private: std::shared_ptr<logging::Logger> logger_; std::string serial_number_; + + std::shared_ptr<state::UpdateController> c2_agent_; Review comment: You have a valid point. Made it a unique_ptr ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
