Download the PHP package totara/xhprof without Composer
On this page you can find all versions of the php package totara/xhprof. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download totara/xhprof
More information about totara/xhprof
Files in totara/xhprof
Package xhprof
Short Description Fork of XHProf for Totara
License Apache-2.0
Informations about the package xhprof
xhprof
This is a fork specifically for Totara projects.
XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based navigational interface. The raw data collection component is implemented in C (as a PHP extension). The reporting/UI layer is all in PHP. It is capable of reporting function-level inclusive and exclusive wall times, memory usage, CPU times and number of calls for each function. Additionally, it supports ability to compare two runs (hierarchical DIFF reports), or aggregate results from multiple runs.
This version supports PHP8 and supports Totara 20 onwards only.
PHP Version
- 8.2
Installation
configuration add to your php.ini
php.ini configuration
| Options | Defaults | Version | Explain |
|---|---|---|---|
| xhprof.output_dir | "" | All | Output directory |
| xhprof.sampling_interval | 100000 | >= v2.* | Sampling interval to be used by the sampling profiler, in microseconds |
| xhprof.sampling_depth | INT_MAX | >= v2.* | Depth to trace call-chain by the sampling profiler |
| xhprof.collect_additional_info | 0 | >= v2.1 | Collect mysql_query, curl_exec internal info. The default is 0. Open value is 1 |
Turn on extra collection
php.ini adds xhprof.collect_additional_info
`
Options
XHPROF_FLAGS_NO_BUILTINSdo not profile builtinsXHPROF_FLAGS_CPUgather CPU times for funcsXHPROF_FLAGS_MEMORYgather memory usage for funcs
Example
wtThe execution time of the function method is time consumingctThe number of times the function was calledcpuThe CPU time consumed by the function method executionmuMemory used by function methods. The call is zend_memory_usage to get the memory usagepmuPeak memory used by the function method. The call is zend_memory_peak_usage to get the memory
PDO::exec
PDO::query
mysqli_query
Output data
PDO::prepare
Convert preprocessing placeholders for actual parameters, more intuitive analytic performance (does not change the zend execution process)