Refactoring performance test script