xhprof_enable

(PECL xhprof >= 0.9.0)

xhprof_enable — xhprof 프로파일러 시작


설명

xhprof_enable(int $flags = 0, array $options = ?): void

xhprof 프로파일링을 시작합니다.


매개변수

flags
프로파일링에 추가 정보를 추가하기 위한 선택적 플래그입니다. 이러한 플래그에 대한 추가 정보는 XHprof 상수를 참조하십시오(예: 메모리 프로파일링을 활성화하는 XHPROF_FLAGS_MEMORY).
options
선택적 옵션의 배열, 즉 프로파일링 중에 무시할 함수를 전달하는 'ignored_functions' 옵션.

반환 값

null


변경 로그

Version Description
PECL xhprof 0.9.2 선택적 options 매개 변수가 추가되었습니다.

Examples

예제 #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')));
?>
                  
                

기타