Added computation of the maximum.
Added various monitoring metrics.