Prefer composition over inheritance in PerformanceTest hierarchy (#10262)
Previously, we had a bad `PerformanceTest` hierarchy:
This PR does a refactoring - extracts a `PerformanceTestReporter`/`DistributedPerformanceTestReporter` out of the `PerformanceTest` hierarchy, because https://github.com/gradle/gradle-private/issues/2192 wants a report, too.
The hierarchy after the refactoring:
So we can make things easier.
Rerun distributed performance test in RERUNNER step (#8801)
After the improvement of automatically rerunning and tagging, we want to manage performance test in the same way:
- Only run each performance test scenario once.
- If it fails, `GRADLE_RERUNNER` will kick in and rerun the failed scenario. The good thing is that it might be scheduled to another build agent, which mitigates the effect of bad agent.
This PR does:
- Remove all `Retry` from performance tests.
- Add `GRADLE_RERUNNER` to performance tests and refactor some code.
- Add tests for `PerformanceTest`.
- Since `GRADLE_RERUNNER` depends on reading of test binary result, write binary test result file in `RerunableDistributedPerformanceTest`.