Class SiddhiLatencyMetric
- java.lang.Object
-
- io.siddhi.core.util.statistics.metrics.SiddhiLatencyMetric
-
- All Implemented Interfaces:
LatencyTracker
public class SiddhiLatencyMetric extends Object implements LatencyTracker
Class to calculate Siddhi latency.
-
-
Constructor Summary
Constructors Constructor Description SiddhiLatencyMetric(String name, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()voidmarkIn()This is called when the processing of the event is started.voidmarkOut()This is called to when the processing of an event is finished.
-
-
-
Constructor Detail
-
SiddhiLatencyMetric
public SiddhiLatencyMetric(String name, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
markIn
public void markIn()
This is called when the processing of the event is started. This is called at ProcessStreamReceiver#receive before the event is passed into process chain- Specified by:
markInin interfaceLatencyTracker
-
markOut
public void markOut()
This is called to when the processing of an event is finished. This is called at two places, 1. OutputRateLimiter#sendToCallBacks - When the event is processed and by the full chain and emitted out 2. ProcessStreamReceiver#receive - When event is not processed by full process chain(e.g. Filtered out by a filter)- Specified by:
markOutin interfaceLatencyTracker
-
getName
public String getName()
- Specified by:
getNamein interfaceLatencyTracker- Returns:
- Name of the latency tracker
-
-