esecules commented on code in PR #9577:
URL: https://github.com/apache/nifi/pull/9577#discussion_r2015156862
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/prometheusutil/PrometheusMetricsUtil.java:
##########
@@ -508,4 +518,25 @@ private static void addStorageUsageMetric(final
NiFiMetricsRegistry nifiMetricsR
nifiMetricsRegistry.setDataPoint(storageUsage.getUsedSpace(),
usedSpaceLabel,
instanceId, componentType, componentName, componentId,
parentId, storageUsage.getIdentifier());
}
+
+ private static void addProcessingPerformanceMetrics(final
NiFiMetricsRegistry niFiMetricsRegistry, final ProcessingPerformanceStatus
perfStatus, final String instanceId,
+ final String
componentType, final String componentName, final String componentId, final
String parentId) {
+ if (perfStatus != null) {
+ niFiMetricsRegistry.setDataPoint(perfStatus.getCpuDuration() /
1000.0, "PROCESSING_PERF_CPU_MILLIS",
+ instanceId, componentType, componentName, componentId,
parentId, perfStatus.getIdentifier());
+
+ // Base metric already in milliseconds
+
niFiMetricsRegistry.setDataPoint(perfStatus.getGarbageCollectionDuration(),
"PROCESSING_PERF_GC_MILLIS",
+ instanceId, componentType, componentName, componentId,
parentId, perfStatus.getIdentifier());
+
+
niFiMetricsRegistry.setDataPoint(perfStatus.getContentReadDuration() / 1000.0,
"PROCESSING_PERF_READ_MILLIS",
+ instanceId, componentType, componentName, componentId,
parentId, perfStatus.getIdentifier());
+
+
niFiMetricsRegistry.setDataPoint(perfStatus.getContentWriteDuration() / 1000.0,
"PROCESSING_PERF_WRITE_MILLIS",
+ instanceId, componentType, componentName, componentId,
parentId, perfStatus.getIdentifier());
+
+
niFiMetricsRegistry.setDataPoint(perfStatus.getSessionCommitDuration() /
1000.0, "PROCESSING_PERF_COMMIT_MILLIS",
+ instanceId, componentType, componentName, componentId,
parentId, perfStatus.getIdentifier());
Review Comment:
done
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]