Refactored statistics to be used both by BackgroundStats and StressTest