July 1, 2015 by: Xavier Perez

Benchmark trace & log any php, without modifying a single line of code. Usefull to trace access, monitoring run times & ram and debugging params (get / post / argv).

This class can log time and resources used during PHP script execution until they exit without having to change the actual script code.

It appends to a log file the time a script took execute since the class was loaded, as well the maximum usage of RAM, the URL of current request and the request parameters.

The log files will be stored separated by days in a different directory per virtual host.

Configuring PHP to run the class before the script starts using the php_value auto_prepend_file configuration value and calling it for the last time from the PHP shutdown function, the class can measure the time and resource usage since the beginning until the end of execution of the script.

The class can also be started in the beginning of regular PHP scripts without requiring changes to PHP configuration values.

Download link

Comments are closed.