facile-it / paraunit

Run PHPUnit tests in parallel
https://engineering.facile.it/paraunit/
Apache License 2.0
140 stars 15 forks source link

Memory and time consumption #65

Closed dxops closed 7 years ago

dxops commented 7 years ago

Currently, we use PHPUnit plugins to track single test case duration. Plugins reporting to output will not work with JSON approach in Paraunit

Would be good to have an ability to track single test case memory and time consumption. Threshold option might filter results not to report all tests Another option might control test case failure in case test case is slow or a lot of memory used

Jean85 commented 7 years ago

I'm not sure about this approach. Since Paraunit launches a lot of separated PHPUnit processes, this may impact time and memory usage: each process has to launch PHPUnit from scratch, so there is a definitive overhead there.

Also, IIRC, PHPUnit has a native option to make a test fail if it takes too long...

ranpafin commented 7 years ago

The single test execution time could also be inflated by the number of parallel processes, in truth i think the best way to know a single process resource consumption is still thru vanilla PHPunit.

taueres commented 7 years ago

@Jean85 That's right, PhpUnit supports test execution timeout as described in https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.test-execution-timeout

Jean85 commented 7 years ago

Ok, so tracking time should may be unreliable and should be done on PHPUnit side. On the matter of memory consumption, I still believe it's unreliable; closing this until other suggestions.