99use PetrKnap \Profiler \ProfilerInterface ;
1010use PHPUnit \Framework \Attributes \DataProvider ;
1111use PHPUnit \Framework \Attributes \Depends ;
12- use PHPUnit \Framework \ExpectationFailedException ;
1312use PHPUnit \Framework \TestCase ;
1413use stdClass ;
1514use Symfony \Component \Process \Process ;
@@ -104,7 +103,7 @@ public function testPipelineDoesNotHaveMemoryLeak(ProfileInterface $profile): vo
104103 [$ referenceProfile , $ pipelineProfile ] = $ profile ->getChildren ();
105104
106105 self ::assertLessThanOrEqual (
107- $ referenceProfile ->getMemoryUsageChange () * 1.05 , # allow 5 % overhead
106+ $ referenceProfile ->getMemoryUsageChange () * 1.1 , # allow 10 % overhead
108107 $ pipelineProfile ->getMemoryUsageChange (),
109108 );
110109
@@ -117,14 +116,11 @@ public function testPipelineDoesNotHaveMemoryLeak(ProfileInterface $profile): vo
117116 public function testPipelinePerformanceIsOk (ProfileInterface $ profile ): void
118117 {
119118 [$ referenceProfile , $ pipelineProfile ] = $ profile ->getChildren ();
120- try { # @todo fix performance and remove try / catch
121- self ::assertLessThanOrEqual (
122- $ referenceProfile ->getDuration () * 1.05 , # allow 5% overhead
123- $ pipelineProfile ->getDuration (),
124- );
125- } catch (ExpectationFailedException $ expectationFailed ) {
126- self ::markTestIncomplete ($ expectationFailed ->getMessage ());
127- }
119+
120+ self ::assertLessThanOrEqual (
121+ $ referenceProfile ->getDuration () * 1.1 , # allow 10% overhead
122+ $ pipelineProfile ->getDuration (),
123+ );
128124 }
129125
130126 #[DataProvider('dataThrows ' )]
0 commit comments