Download the PHP package tatarysh/phpunit-memory-and-time-usage-listener without Composer
On this page you can find all versions of the php package tatarysh/phpunit-memory-and-time-usage-listener. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tatarysh/phpunit-memory-and-time-usage-listener
More information about tatarysh/phpunit-memory-and-time-usage-listener
Files in tatarysh/phpunit-memory-and-time-usage-listener
Package phpunit-memory-and-time-usage-listener
Short Description PHPUnit Listener for measure time and memory usage
License MIT
Homepage https://github.com/tatarysh/phpunit-memory-and-time-usage-listener
Informations about the package phpunit-memory-and-time-usage-listener
PHPUnit Memory & Time usage Listener
This PHPUnit listener provides information about each test time, memory and memory peak usage, with two versions configured by parameters:
- One in which at the end of the test suits shows the information for all the executed test.
- One in which you indicates the edge for all the measurements and it only shows the results if one ot them exceed it's edge.
If no parameter is defined on the phpunit.xml the default behaviour is to show all the results.
The arguments you can define on the phpunit.xml file are:
- showOnlyIfEdgeIsExceeded (boolean): The default value is false, if you set it to true is recommended to set the other three optional arguments.
- executionTimeEdge (int)(milliseconds): Only needed if
showOnlyIfEdgeIsExceeded
is set to true. The default value is 100 and indicates the limit of usage time for every test - memoryUsageEdge (int)(bytes): Only needed if
showOnlyIfEdgeIsExceeded
is set to true. The default value is 1024 and indicates indicate the limit of memory usage for every usage - memoryPeakDifferenceEdge (int)(bytes): Only needed if
showOnlyIfEdgeIsExceeded
is set to true. The default value is 1024 and indicates the maximum difference between memory peak.
Installation:
The installation for use this listener it's as easy as require it with composer as any other. I recommend to indicate the requirement only for dev.
Usage examples:
XML example for listener usage without edges:
XML example for listener usage with edges: