Added collection and printing of metrics