#!/bin/bash

# provide internal event processing stats, gives good indication of amount
# of synchronization/work performed in the run

TP=`egrep 'event_polls' $1 | cut -d: -f2 | awk '{s+=$1} END {print s}'`
TE=`egrep 'total_events_polled' $1 | cut -d: -f2 | awk '{s+=$1} END {print s}'`
ME=`egrep 'max_events_polled' $1 | cut -d: -f2 | awk 'BEGIN { max =0; } { if ($1>max) max=$1; } END {print max}'`
SUBS=`egrep 'max_events_polled' $1 | wc -l`

echo "events processed total:" $TE
echo "event polls:" $TP
echo "max #events in poll: " $ME





