Add an option to have the test emit statistics as diagnostics.