array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.xhprof-enable.php', 1 => 'xhprof_enable', ), 'up' => array ( 0 => 'ref.xhprof.php', 1 => 'Xhprof Funktionen', ), 'prev' => array ( 0 => 'function.xhprof-disable.php', 1 => 'xhprof_disable', ), 'next' => array ( 0 => 'function.xhprof-sample-disable.php', 1 => 'xhprof_sample_disable', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/xhprof/functions/xhprof-enable.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL xhprof >= 0.9.0)
xhprof_enable — Start xhprof profiler
flags
Optional flags to add additional information to the profiling. See the
XHprof constants for further
information about these flags, e.g., XHPROF_FLAGS_MEMORY
to enable memory profiling.
options
An array of optional options, namely, the 'ignored_functions' option to pass in functions to be ignored during profiling.
Version | Beschreibung |
---|---|
PECL xhprof 0.9.2 |
The optional options parameter was added.
|
Beispiel #1 xhprof_enable() examples
<?php
// 1. elapsed time + memory + CPU profiling; and ignore built-in (internal) functions
xhprof_enable(XHPROF_FLAGS_NO_BUILTINS | XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY);
// 2. elapsed time profiling; ignore call_user_func* during profiling
xhprof_enable(
0,
array('ignored_functions' => array('call_user_func',
'call_user_func_array')));
// 3. elapsed time + memory profiling; ignore call_user_func* during profiling
xhprof_enable(
XHPROF_FLAGS_MEMORY,
array('ignored_functions' => array('call_user_func',
'call_user_func_array')));
?>