Move metrics measure in a specific class and display metrics at the end
of the program only.