-
Notifications
You must be signed in to change notification settings - Fork 66
Testing and Performance
neomerx edited this page May 27, 2015
·
6 revisions
$ phpunit
Sample application includes performance test. It can be run with default parameters
$ php sample.php -t
or with execution time measurement and specified number of iterations
$ php time sample.php -t=10000
If your system has debug assertions enabled it is recommended to turn them off. Just to give you an idea that debug assert are not free here is the execution time comparison
Debug asserts mode | Command | Execution time |
---|---|---|
Enabled | $ php -d assert.active=1 sample.php -t=10000 |
7.589s |
Disabled | $ php -d assert.active=0 sample.php -t=10000 |
2.884s |
The following command could be used for performance profiling with blackfire.io
$ blackfire --slot <slot number here> --samples 1 run php -d assert.active=0 sample.php -t=100
Are you in a mood to optimize performance? You can start from this performance baseline profile.