XDEBUG PROFILING MODES
Записки веб разработчика
Категории
О записках
Записки веб разработчика это статьи и ссылки по веб разработке, дизайну, продвижению веб-рессурсов а также описание и ссылки на полезные скрипты
Администрирование
Четверг, 22 Февраль. 2007
XDEBUG PROFILING MODES
PROFILING MODESXDEBUG_PROFILER_LBL (0) default
Line by Line Profile, this is the simplest profiling mode that will display the profiling data sorted by line numbers from smallest to greatest. This profile mode can be used to give you a quick overview of your code's flow as the script progresses, to give you some a general idea about which section(s) of the code optimization efforts should focus on.
XDEBUG_PROFILER_CPU (1)
Execution Time Profile, this is essentially the same profile as line by line, with one notable exception, the function calls are sorted by the amount of time they took to execute, from greatest to smallest.
XDEBUG_PROFILER_NC (2)
When the profiler encounters the same function being called on the same line it will merge the calls to this function on that line into a single entry. This profile mode, which is virtually identical to the line by line profile will sort the profiler data based on number of calls to the same function on the same line. Since it is very rare that you would call the same function on the same line more then once and usually signifies unnecessary code this profile mode enables you to quickly detect and resolve such oversights.
XDEBUG_PROFILER_FS_AV (3)
Average Execution Time Profile, all calls to the same function will be merged into a single entry and the output will be sorted based on the average time each function took to execute, sorted from greatest to smallest. This is probably one of the more useful profiling modes because it allows you to immediately see, which functions are slow and could use improvement.
XDEBUG_PROFILER_FS_SUM (4)
Total Execution Time Profile is almost identical to the Average Execution Time Profile, except this the output is sorted based on the total time calls to a certain function took. Once again a very useful profile, because it allows you to see the cumulative effect of calling a particular function.
XDEBUG_PROFILER_FS_NC (5)
Number of Total Function Calls Profile, will generate a profile similar to Average Execution Time Profile, with the one exception of sorting the data based on the number of calls to a particular function in the entire script. This is very useful in determining, what common functions are used, so that you can either optimize their usage or try to reduce the number of calls to those functions.
XDEBUG_PROFILER_SD_LBL (6)
Line by Line Stack Profile, this profile allows you to see the execution tree of the functions used in the script, allowing you to see the 'flow' of the script and how long each portion took.
XDEBUG_PROFILER_SD_CPU (7)
Execution Time Stack Profile, nearly identical to Line by Line Stack Profile, only now the stack segments are sorted based on the time it took to execute each portion of the code.
XDEBUG_PROFILER_SD_NC (8)
Total Function Calls Stack Profile, same as above, only sorted by number of function calls this time.
Добавил Divider
в категории PHP Отладка и оптимизация
в
17:04
| Комментарии (0)
| Обратные ссылки (0)
Обратные ссылки
URI этой записи для создания обратных ссылок (trackback)
Нет обратных ссылок






