Adding calculation of final statistics to JSON processor.