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



##########
File path: extensions/pdh/PerformanceDataMonitor.cpp
##########
@@ -102,25 +108,36 @@ void 
PerformanceDataMonitor::onTrigger(core::ProcessContext* context, core::Proc
   rapidjson::Value& body = prepareJSONBody(root);
   for (auto& counter : resource_consumption_counters_) {
     if (counter->collectData())
-      counter->addToJson(body, root.GetAllocator());
+      counter->addToJson(body, root.GetAllocator(), double_precision_);
+  }
+  if (pretty_output_) {
+    utils::PrettyJsonOutputCallback callback(std::move(root));
+    session->write(flowFile, &callback);
+    session->transfer(flowFile, Success);
+  } else {
+    utils::JsonOutputCallback callback(std::move(root));
+    session->write(flowFile, &callback);
+    session->transfer(flowFile, Success);
   }
-  utils::JsonOutputCallback callback(std::move(root));
-  session->write(flowFile, &callback);
-  session->transfer(flowFile, Success);
 }
 
 void PerformanceDataMonitor::initialize() {
-  setSupportedProperties({ CustomPDHCounters, PredefinedGroups, 
OutputFormatProperty });
+  setSupportedProperties({ CustomPDHCounters, PredefinedGroups, 
OutputFormatProperty, DoublePrecisionProperty });

Review comment:
       that conflicts with the PerformanceDataMonitor::OutputFormat enum class




-- 
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]


Reply via email to