Оцените время выполнения и количество скрипта PHP с помощью Xdebug - PullRequest
0 голосов
/ 08 февраля 2012

Недавно я обнаружил, что мой сервер всегда сильно загружен, затем я установил Xdebug , чтобы отследить, какой PHP-скрипт вызывает высокую загрузку.Пока включен модуль, я получил файл с именем trace.2043925204.00879e.xt.Я прочитал этот файл и получил сообщение ниже, мой вопрос: как я могу проверить, какой код PHP часто выполняется , а какой код PHP занимает много времени для выполнения ?

Спасибо

TRACE START [2012-02-08 02:03:30]
    0.0002      69336   -> {main}() /srv/www/htdocs/index.php:0
    0.0036     324700     -> require_once(/srv/www/htdocs/includes/bootstrap.inc) /srv/www/htdocs/index.php:15
    0.0036     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:13
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:18
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:23
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:28
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:35
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:46
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:57
    0.0037     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:68
    0.0038     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:79
    0.0038     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:90
    0.0038     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:101
    0.0038     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:112
    0.0038     324820       -> define() /srv/www/htdocs/includes/bootstrap.inc:123
    0.0038     324876       -> define() /srv/www/htdocs/includes/bootstrap.inc:128
    0.0038     324876       -> define() /srv/www/htdocs/includes/bootstrap.inc:134
    0.0039     324876       -> define() /srv/www/htdocs/includes/bootstrap.inc:139
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:144
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:149
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:155
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:160
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:165
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:171
    0.0039     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:176
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:181
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:186
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:192
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:199
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:205
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:210
    0.0040     324924       -> define() /srv/www/htdocs/includes/bootstrap.inc:215
    0.0041     305356     -> drupal_bootstrap() /srv/www/htdocs/index.php:16
    0.0041     305632       -> _drupal_bootstrap() /srv/www/htdocs/includes/bootstrap.inc:1091
    0.0041     305892         -> drupal_unset_globals() /srv/www/htdocs/includes/bootstrap.inc:1101
    0.0041     305892           -> ini_get() /srv/www/htdocs/includes/bootstrap.inc:342
    0.0041     305892         -> timer_start() /srv/www/htdocs/includes/bootstrap.inc:1103
    0.0042     306092           -> microtime() /srv/www/htdocs/includes/bootstrap.inc:228
    0.0042     306092           -> explode() /srv/www/htdocs/includes/bootstrap.inc:228
    0.0042     306660         -> conf_init() /srv/www/htdocs/includes/bootstrap.inc:1105
    0.0042     307856           -> strtolower() /srv/www/htdocs/includes/bootstrap.inc:381
    0.0043     310772           -> drupal_valid_http_host() /srv/www/htdocs/includes/bootstrap.inc:382
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...