(PECL xhprof >= 0.9.0)
xhprof_enable — 锟斤拷锟斤拷 xhprof 锟斤拷锟杰凤拷锟斤拷锟斤拷
$flags
= 0
[, array $options
]] ) : void锟斤拷锟斤拷 xhprof 锟斤拷锟斤拷锟斤拷锟杰凤拷锟斤拷锟斤拷
flags
锟斤拷锟斤拷锟斤拷佣锟斤拷锟斤拷锟较拷目锟窖★拷锟角★拷
锟斤拷锟节此憋拷堑母锟斤拷锟斤拷锟较拷渭锟�
XHprof 锟斤拷锟斤拷锟斤拷锟斤拷锟界,
XHPROF_FLAGS_MEMORY
锟斤拷锟皆匡拷锟斤拷锟节达拷姆锟斤拷锟斤拷锟�
options
array 锟侥匡拷选选锟筋,锟斤拷锟斤拷通锟斤拷锟斤拷锟斤拷 'ignored_functions' 选锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟杰凤拷锟斤拷锟叫碉拷某些锟斤拷锟斤拷锟斤拷
NULL
锟芥本 | 说锟斤拷 |
---|---|
0.9.2 |
锟斤拷涌锟窖★拷锟� options 锟斤拷锟斤拷锟斤拷
|
Example #1 xhprof_enable() 锟斤拷锟斤拷
<?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')));
?>