Track wallclock time spent in each filter.

Fixes #5472
This commit is contained in:
Jordan Sissel 2016-06-04 08:41:58 -07:00
parent bb0694d69a
commit 5a4d4bc3ba

View file

@ -37,7 +37,9 @@ module LogStash
def multi_filter(events)
@metric_events.increment(:in, events.size)
start = Time.now
new_events = @filter.multi_filter(events)
@filter.metric.increment(:time_ms, ((Time.now - start)*1000).to_i)
# There is no garantee in the context of filter
# that EVENTS_INT == EVENTS_OUT, see the aggregates and