mirror of https://github.com/apache/nifi.git
NIFI-1921: Fixed bug in how average lineage duration was calculated for cluster stat
Signed-off-by: Matt Burgess <mattyb149@apache.org> This closes #1912
This commit is contained in:
parent
2b47ade0c4
commit
c0ad5bcc7b
|
@ -115,12 +115,13 @@ public enum ProcessorStatusDescriptor {
|
||||||
|
|
||||||
for (final StatusSnapshot snapshot : values) {
|
for (final StatusSnapshot snapshot : values) {
|
||||||
final long removed = snapshot.getStatusMetrics().get(FLOWFILES_REMOVED.getDescriptor()).longValue();
|
final long removed = snapshot.getStatusMetrics().get(FLOWFILES_REMOVED.getDescriptor()).longValue();
|
||||||
count += removed;
|
final long outputCount = snapshot.getStatusMetrics().get(OUTPUT_COUNT.getDescriptor()).longValue();
|
||||||
|
final long processed = removed + outputCount;
|
||||||
|
|
||||||
count += snapshot.getStatusMetrics().get(OUTPUT_COUNT.getDescriptor()).longValue();
|
count += processed;
|
||||||
|
|
||||||
final long avgMillis = snapshot.getStatusMetrics().get(AVERAGE_LINEAGE_DURATION.getDescriptor()).longValue();
|
final long avgMillis = snapshot.getStatusMetrics().get(AVERAGE_LINEAGE_DURATION.getDescriptor()).longValue();
|
||||||
final long totalMillis = avgMillis * removed;
|
final long totalMillis = avgMillis * processed;
|
||||||
millis += totalMillis;
|
millis += totalMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue