JonathanKessler commented on a change in pull request #4780:
URL: https://github.com/apache/nifi/pull/4780#discussion_r582160063



##########
File path: 
nifi-framework-api/src/main/java/org/apache/nifi/controller/queue/FlowFileQueue.java
##########
@@ -93,6 +93,18 @@
 
     QueueSize size();
 
+    /**
+     * @param fromTimestamp The timestamp in milliseconds from which to 
calculate durations. This will typically be the current timestamp.
+     * @return the sum in milliseconds of how long all FlowFiles within this 
queue have currently been in this queue.
+     */
+    long getTotalActiveQueuedDuration(long fromTimestamp);

Review comment:
       This was an attempt to restrict the scope of this particular metric to 
flow files that were not swapped but in hindsight that isn't necessarily useful 
so will update the logic to include them as well per your suggestion. This 
metric is telling us the sum of the queued duration of all flow files within a 
given connection. My use case is to track both the average as well as the max 
duration to find bottlenecks/issues. I chose to report the total vs calculating 
and reporting an average to match the logic of other metrics contained within 
the ConnectionStatus class (InputBytes and OutputBytes).




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