martinzink commented on a change in pull request #1032:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1032#discussion_r596771906



##########
File path: libminifi/include/core/state/nodes/DeviceInformation.h
##########
@@ -490,6 +477,8 @@ class DeviceInfoNode : public DeviceInformation {
   std::string hostname_;
   std::string ip_;
   std::string device_id_;
+  static utils::SystemCPUUsageTracker cpu_load_tracker_;
+  static std::mutex cpu_load_tracker_mutex_;

Review comment:
       this is static because CPU Usage tracking needs some persistent data, 
because it compares CPU ticks between heartbeats, but the response nodes are 
instantiated and destroyed with each heartbeat.
   
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to