array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.xhprof-enable.php', 1 => 'xhprof_enable', ), 'up' => array ( 0 => 'ref.xhprof.php', 1 => 'Xhprof Funciones', ), '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' => 'es', '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 — Inicia perfil xhprof
flags
Flags opcionales para añadir información adicional a la creación de perfiles. Véase las
constantes XHprof Para obtener más información
acerca de estos flags, p. ej., XHPROF_FLAGS_MEMORY
para permitir perfiles de memoria.
options
Un array de opciones opcionales, es decir, la opción 'ignored_functions' para pasar en las funciones que se ignoraron durante el perfilado.
Versión | Descripción |
---|---|
PECL xhprof 0.9.2 |
El parámetro opcional options fué agregado.
|
Ejemplo #1 Ejemplos de xhprof_enable()
<?php
// 1. tiempo transcurrido + memoria + perfiles CPU; e ignorar las funciones integradas (internas)
xhprof_enable(XHPROF_FLAGS_NO_BUILTINS | XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY);
// 2. perfil tiempo transcurrido; ignorando call_user_func* durante el perfilado
xhprof_enable(
0,
array('ignored_functions' => array('call_user_func',
'call_user_func_array')));
// 3. tiempo transcurrido + perfil de memoria; ignorando call_user_func* durante el perfilado
xhprof_enable(
XHPROF_FLAGS_MEMORY,
array('ignored_functions' => array('call_user_func',
'call_user_func_array')));
?>