Added stats computing to testcase