diff --git a/modules/siddhi-core/src/main/java/io/siddhi/core/table/Table.java b/modules/siddhi-core/src/main/java/io/siddhi/core/table/Table.java index f98d36fd8c..44e4e02594 100644 --- a/modules/siddhi-core/src/main/java/io/siddhi/core/table/Table.java +++ b/modules/siddhi-core/src/main/java/io/siddhi/core/table/Table.java @@ -222,6 +222,10 @@ public void addEvents(ComplexEventChunk addingEventChunk, int noOfE } addingEventChunk.reset(); add(addingEventChunk); + if (latencyTrackerInsert != null && + Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { + latencyTrackerInsert.markOut(); + } if (throughputTrackerInsert != null && Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { throughputTrackerInsert.eventsIn(noOfEvents); @@ -336,6 +340,10 @@ public void deleteEvents(ComplexEventChunk deletingEventChunk, Compi latencyTrackerDelete.markIn(); } delete(deletingEventChunk, compiledCondition); + if (latencyTrackerDelete != null && + Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { + latencyTrackerDelete.markOut(); + } if (throughputTrackerDelete != null && Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { throughputTrackerDelete.eventsIn(noOfEvents); @@ -415,6 +423,10 @@ public void updateEvents(ComplexEventChunk updatingEventChunk, latencyTrackerUpdate.markIn(); } update(updatingEventChunk, compiledCondition, compiledUpdateSet); + if (latencyTrackerUpdate != null && + Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { + latencyTrackerUpdate.markOut(); + } if (throughputTrackerUpdate != null && Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { throughputTrackerUpdate.eventsIn(noOfEvents); @@ -500,6 +512,10 @@ public void updateOrAddEvents(ComplexEventChunk updateOrAddingEventC } updateOrAdd(updateOrAddingEventChunk, compiledCondition, compiledUpdateSet, addingStreamEventExtractor); + if (latencyTrackerUpdateOrInsert != null && + Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { + latencyTrackerUpdateOrInsert.markOut(); + } if (throughputTrackerUpdateOrInsert != null && Level.BASIC.compareTo(siddhiAppContext.getRootMetricsLevel()) <= 0) { throughputTrackerUpdateOrInsert.eventsIn(noOfEvents);