Added computation of the new statistics.

Added computation of the average transaction length as well as the
amount of time spent in transactions.