trappy: Improve performance of parser
Created by: joelagnel
This patch reduces the frequency of calling getrusage resulting in a ~3-5% performance improvement in parsing. We do a check in the beginning and then check once every 10000 events.
Signed-off-by: Joel Fernandes joelaf@google.com