How to reproduce:
1. Open the attached project "PerfSampleGroupRepro"
2. Open Window -> General -> Test Runner and select the PlayMode tab
3. Run the whole EmptySampleGroupRepro fixture (2 tests)
4. Observe the Test Runner and the Console
5. Now run only "B_OrdinaryPerformanceTest" and observe the results
Expected results: Test A either passes or fails on its own, and test B, an ordinary Measure.Method test that passes in isolation, is unaffected by it
Actual results: Both tests fail with "ArgumentOutOfRangeException: Index was out of range" thrown from AfterTest; test B passes when run on its own, so the failure of A propagates to every performance test that runs after it
Reproducible with: 6000.6.0b9, 6000.7.0a5
Can't test with: 6000.0.81f1, 6000.3.17f1, 6000.5.10f1 (Tests can't be loaded)
Reproducible on: macOS Tahoe 26.6 (M1 Max)
Not reproducible on: No other environment tested
First lines of error:
AfterTest : System.ArgumentOutOfRangeException : Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index)
at Unity.PerformanceTesting.Runtime.Utils.UpdateStatistics (Unity.PerformanceTesting.SampleGroup sampleGroup) [0x00028] in ./Library/PackageCache/com.unity.test-framework.performance@6.6.0/Runtime/Utils.cs:77