awk has the special actions triggered by the
ENDing the processing of
stdin (or each individual input file).
(There are also variables automatically maintained by the tool (like
Is there any equivalent in Logstash? For example, when working on filters, it is very useful to see the throughput -- events per second -- but using external tools (like
time(1)) is imprecise, because logstash is very slow to startup.
Can I somehow start a counter, when the first event is read from
stdin and finish it, when the processing ends?
I suppose, I can use
init-clause to capture the beginning, but how would I report the results at the end -- without reporting them for every event?