9if (!defined(
"B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==
true)
33div.bx-
debug-content-table tr.heading td {background-
color:#E1EEDA;}
34div.bx-
debug-content-table tr.heading-sort td {white-
space:nowrap; border-bottom:solid 1px #dce7ed; cursor:pointer;}
36div.bx-
debug-content-table tr.cache-row td {white-
space:nowrap;}
37div.bx-
debug-content-table tr.heading-bottom td {padding:3px 3px 9px 3px !important;}
38div.bx-
debug-content-table td {padding-
right:4px !important; padding-bottom:4px !important;}
39div.bx-
debug-content-table td.number {padding-
right:4px !important; padding-bottom:4px !important; text-
align:
right !important; white-
space:nowrap !important}
43if ($bShowTime || $bShowStat || $bShowCacheStat)
45 ?><div
class=
"bx-component-debug bx-debug-summary"><?
53 $CURRENT_TIME = microtime(
true);
55 $PROLOG_BEFORE_1 = START_EXEC_PROLOG_BEFORE_1;
56 $PROLOG_BEFORE_2 = defined(
'START_EXEC_PROLOG_BEFORE_2') ? START_EXEC_PROLOG_BEFORE_2 : START_EXEC_PROLOG_BEFORE_1;
57 $PROLOG_BEFORE = $PROLOG_BEFORE_2 - $PROLOG_BEFORE_1;
60 $PROLOG_AFTER_2 = $PROLOG_BEFORE_2;
61 if (defined(
'START_EXEC_PROLOG_AFTER_2') && defined(
'START_EXEC_PROLOG_AFTER_1'))
65 $PROLOG_AFTER = $PROLOG_AFTER_2 - $PROLOG_AFTER_1;
68 $PROLOG = $PROLOG_BEFORE + $PROLOG_AFTER;
73 if (defined(
"START_EXEC_EPILOG_BEFORE_1"))
76 $WORK_AREA = $EPILOG_BEFORE_1 - $PROLOG_AFTER_2;
78 if (defined(
"START_EXEC_EPILOG_AFTER_1"))
81 $EPILOG_BEFORE = $EPILOG_AFTER_1 - $EPILOG_BEFORE_1;
82 $EPILOG_AFTER = $CURRENT_TIME - $EPILOG_AFTER_1;
85 $EPILOG = $CURRENT_TIME - $EPILOG_BEFORE_1;
89 $WORK_AREA = $CURRENT_TIME - $PROLOG_AFTER_2;
92 $PAGE = $CURRENT_TIME - $PROLOG_BEFORE_1;
95 "PAGE" => [
"FLT" => [
"PB",
"PA",
"WA",
"EB",
"EV",
"EA"],
"TIME" => $PAGE],
96 "PROLOG" => [
"FLT" => [
"PB",
"PA"],
"TIME" => $PROLOG],
97 "PROLOG_BEFORE" => [
"FLT" => [
"PB"],
"TIME" => $PROLOG_BEFORE],
98 "PROLOG_AFTER" => [
"FLT" => [
"PA"],
"TIME" => $PROLOG_AFTER],
99 "WORK_AREA" => [
"FLT" => [
"WA"],
"TIME" => $WORK_AREA],
100 "EPILOG" => [
"FLT" => [
"EB",
"EV",
"EA"],
"TIME" => $EPILOG],
101 "EPILOG_BEFORE" => [
"FLT" => [
"EB"],
"TIME" => $EPILOG_BEFORE],
102 "EPILOG_AFTER" => [
"FLT" => [
"EV",
"EA"],
"TIME" => $EPILOG_AFTER],
106 foreach ($arAreas as
$i => $arArea)
108 $arAreas[
$i][
"NUM"] = $j;
115 "QUERIES" =>
array(),
116 "TIME" => $arArea[
"TIME"],
117 "COMPONENT_COUNT" => 0,
118 "COMPONENT_TIME" => 0.0,
119 "COMP_QUERY_COUNT" => 0,
120 "COMP_QUERY_TIME" => 0.0,
126 foreach (
$sqlTracker->getQueries() as $arQueryDebug)
128 if ($arQueryDebug[
"BX_STATE"] <>
'')
130 $state = $arQueryDebug[
"BX_STATE"];
133 foreach ($arAreas as
$i => $arArea)
135 if (in_array($state, $arArea[
"FLT"]))
137 $arAreas[
$i][
"TRACE"][
"QUERY_COUNT"]++;
138 $arAreas[
$i][
"TRACE"][
"QUERY_TIME"]+=$arQueryDebug[
"TIME"];
145 foreach (
$APPLICATION->arIncludeDebug as $arIncludeDebug)
147 if ($arIncludeDebug[
"BX_STATE"] <>
'')
149 $state = $arIncludeDebug[
"BX_STATE"];
152 foreach ($arAreas as
$i => $arArea)
154 if (in_array($state, $arArea[
"FLT"]))
156 $arAreas[
$i][
"TRACE"][
"TIME"] -= $arIncludeDebug[
"TIME"];
157 $arAreas[
$i][
"TRACE"][
"COMPONENT_COUNT"]++;
158 $arAreas[
$i][
"TRACE"][
"COMPONENT_TIME"] += $arIncludeDebug[
"TIME"];
159 $arAreas[
$i][
"TRACE"][
"COMP_QUERY_COUNT"] += $arIncludeDebug[
"QUERY_COUNT"];
160 $arAreas[
$i][
"TRACE"][
"COMP_QUERY_TIME"] += $arIncludeDebug[
"QUERY_TIME"];
161 $arAreas[
$i][
"TRACE"][
"CACHE_SIZE"] += $arIncludeDebug[
"CACHE_SIZE"];
168 foreach ($arAreas as
$i => $arArea)
174 echo
'<a href="javascript:jsDebugTimeWindow.Show(); jsDebugTimeWindow.ShowDetails(\'BX_DEBUG_TIME_1_1\')">'
175 . Loc::getMessage(
"debug_info_cr_time")
176 .
'</a> <span id="bx_main_exec_time">' . round($PAGE, 4) .
'</span> '
177 . Loc::getMessage(
"debug_info_sec") .
'<br>';
181 echo Loc::getMessage(
"debug_info_cr_time") .
' <span id="bx_main_exec_time">'
182 . round(
$main_exec_time, 4) .
'</span> ' . Loc::getMessage(
"debug_info_sec") .
'<br />';
188if ($bShowStat || $bShowCacheStat)
196 if (array_key_exists(
"REL_PATH", $arIncludeDebug))
202 echo
'<a title="' . Loc::getMessage(
"debug_info_query_title") .
'" href="javascript:BX_DEBUG_INFO_'
204 .
'.ShowDetails(\'BX_DEBUG_INFO_' .
count(
$APPLICATION->arIncludeDebug) .
'_1\');">'
205 . Loc::getMessage(
"debug_info_total_queries") .
"</a> " . intval(
$totalQueryCount) .
"<br>";
207 echo Loc::getMessage(
"debug_info_total_time") .
" " . round(
$totalQueryTime, 4)
208 .
" " . Loc::getMessage(
"debug_info_sec") .
"<br>";
211 if (
$GLOBALS[
"CACHE_STAT_BYTES"] || $bShowCacheStat)
214 if (!empty($arCacheDebug))
216 echo
'<a title="' . Loc::getMessage(
"debug_info_query_title")
217 .
'" href="javascript:BX_DEBUG_INFO_CACHE.Show(); BX_DEBUG_INFO_CACHE.ShowDetails(\'BX_DEBUG_INFO_CACHE_m_0\');">'
218 . Loc::getMessage(
"debug_info_cache_size") .
"</a> " .
" ",
CFile::FormatSize(\
Bitrix\Main\Diag\CacheTracker::getCacheStatBytes(), 0)
219 .
" (" .
count($arCacheDebug) .
")<br>";
223 echo Loc::getMessage(
"debug_info_cache_size") .
" ",
CFile::FormatSize(\
Bitrix\Main\Diag\CacheTracker::getCacheStatBytes(), 0) .
"<br>";
228if ($bShowTime || $bShowStat)
230 echo
'</div><div class="empty"></div>';
233if ($bShowStat || $bShowCacheStat)
244 require_once(
$_SERVER[
"DOCUMENT_ROOT"].
BX_ROOT.
"/modules/main/interface/admin_lib.php");
247 if (!empty($arCacheDebug))
250 function sortTable(table_id, column_num, reverse)
252 var table = BX(table_id);
253 var
title = table.rows[0].cells[column_num].innerHTML;
254 if (
title.charCodeAt(0) == 8595)
256 if (
title.charCodeAt(0) == 8593)
259 for (var i = 1; i < table.rows.length; i++)
261 for (var j = 1; j < table.rows.length; j++)
263 var a = table.rows[i].cells[column_num].getAttribute(
'sort')? table.rows[i].cells[column_num].getAttribute(
'sort'): table.rows[i].cells[column_num].innerHTML;
264 var ai = parseInt(a);
266 var b = table.rows[j].cells[column_num].getAttribute(
'sort')? table.rows[j].cells[column_num].getAttribute(
'sort'): table.rows[j].cells[column_num].innerHTML;
267 var bi = parseInt(b);
270 if ((!reverse && a < b) || (reverse && a > b))
272 table.tBodies[0].insertBefore(table.rows[i], table.rows[j]);
277 for (var i = 0; i < table.rows[0].cells.length; i++)
280 var
title = table.rows[0].cells[i].innerHTML;
282 title.charCodeAt(0) == 8595
283 ||
title.charCodeAt(0) == 8593
285 table.rows[0].cells[i].innerHTML =
title.substr(1);
288 table.rows[0].cells[i].innerHTML = (reverse?
'↑':
'↓') + table.rows[0].cells[i].innerHTML;
291 BX_DEBUG_INFO_CACHE =
new BX.CDebugDialog();
296 $obJSPopup->StartDescription(
'bx-debug-window');
297 ?><p><?echo Loc::getMessage(
"debug_info_cache_size")?> <?=
CFile::FormatSize(\
Bitrix\Main\Diag\CacheTracker::getCacheStatBytes(), 0)?></p><?
300 ?><div
class=
"bx-debug-content bx-debug-content-table">
301 <table
id=
"cacheDebug" cellpadding=
"2" cellspacing=
"0" border=
"0">
302 <tr
class=
"heading-sort">
303 <td onclick=
"sortTable('cacheDebug', 0)">↓&
nbsp;</td>
304 <td onclick=
"sortTable('cacheDebug', 1)"><?echo Loc::getMessage(
"debug_info_cache_table_func");?></td>
305 <td onclick=
"sortTable('cacheDebug', 2, true)"><?echo Loc::getMessage(
"debug_info_cache_table_size");?></td>
306 <td onclick=
"sortTable('cacheDebug', 3)"><?echo Loc::getMessage(
"debug_info_cache_file_path");?></td>
309 foreach ($arCacheDebug as $j => $cacheDebug)
319 ?><tr
class=
"cache-row">
320 <td
class=
"number"><?echo $j+1?></td>
321 <td><a href=
"javascript:BX_DEBUG_INFO_CACHE.ShowDetails('BX_DEBUG_INFO_CACHE_m_<?=$j?>')"><?echo $cacheDebug[
"callee_func"]?></a></td>
322 <td
class=
"number" sort=
"<?echo $cacheDebug["cache_size
"]?>"><?=
CFile::FormatSize($cacheDebug[
"cache_size"], 0)?></td>
327 </div>#DIVIDER#<div
class=
"bx-debug-content bx-debug-content-details"><?
329 foreach($arCacheDebug as $j => $cacheDebug)
331 ?><div
id=
"BX_DEBUG_INFO_CACHE_m_<?=$j?>" style=
"display:none">
332 <b><?echo Loc::getMessage(
"debug_info_query_from")?></b><?
335 foreach ($cacheDebug[
"TRACE"] as
$n => $tr)
338 <b>(<?echo (
$n + 1)?>)</b><?
347 echo
"</nobr>(".htmlspecialcharsbx(print_r($tr[
"args"],
true)).
")";
360 function filterTable(input, table_id, column_num)
362 var table = BX(table_id);
363 for (var i = 0; i < table.rows.length; i++)
365 var sql = table.rows[i].cells[column_num].innerHTML;
366 if (input.value.length > 0 && sql.indexOf(input.value) == -1)
367 table.rows[i].style.display =
'none';
369 table.rows[i].style.display =
'block';
372 BX_DEBUG_INFO_CACHE =
new BX.CDebugDialog();
377 ?><script>BX_DEBUG_INFO_<?=$i?> =
new BX.CDebugDialog();</script><?
381 $obJSPopup->StartDescription(
'bx-core-debug-info');
383 <p><?=Loc::getMessage(
"debug_info_path")?> <?=($arIncludeDebug[
"PATH"] ??
'')?></p>
384 <p><?=Loc::getMessage(
"debug_info_time")?> <?=($arIncludeDebug[
"TIME"] ??
'')?> <?echo Loc::getMessage(
"debug_info_sec")?></p>
385 <p><?=Loc::getMessage(
"debug_info_queries")?> <?=($arIncludeDebug[
"QUERY_COUNT"] ??
'')?>, <?echo Loc::getMessage(
"debug_info_time1")?> <?=($arIncludeDebug[
"QUERY_TIME"] ??
'')?> <?echo Loc::getMessage(
"debug_info_sec")?><?
if(isset($arIncludeDebug[
"TIME"]) && $arIncludeDebug[
"TIME"] > 0):?> (<?=round($arIncludeDebug[
"QUERY_TIME"]/$arIncludeDebug[
"TIME"]*100, 2)?>%)<?
endif?></p>
386 <p><?=Loc::getMessage(
"debug_info_search")?>: <input type=
"text" style=
"height:16px" onkeydown=
"filterTable(this, 'queryDebug<?echo $i?>', 1)" onpaste=
"filterTable(this, 'queryDebug<?echo $i?>', 1)" oninput=
"filterTable(this, 'queryDebug<?echo $i?>', 1)"></p><?
389 if (!empty($arIncludeDebug[
"QUERIES"]))
391 ?><div
class=
"bx-debug-content bx-debug-content-table"><?
393 foreach ($arIncludeDebug[
"QUERIES"] as $j => $arQueryDebug)
395 $strSql = $arQueryDebug[
"QUERY"];
397 if (!isset($arQueries[$strSql][
"COUNT"]))
399 $arQueries[$strSql][
"COUNT"] = 0;
401 $arQueries[$strSql][
"COUNT"]++;
402 $arQueries[$strSql][
"CALLS"][] = [
403 "TIME"=>$arQueryDebug[
"TIME"],
404 "TRACE"=>$arQueryDebug[
"TRACE"]
407 ?><table
id=
"queryDebug<?echo $i?>" cellpadding=
"0" cellspacing=
"0" border=
"0"><?
409 foreach ($arQueries as $strSql =>
$query)
412 <td
class=
"number" valign=
"top"><?echo $j?></td>
413 <td><a href=
"javascript:BX_DEBUG_INFO_<?=$i?>.ShowDetails('BX_DEBUG_INFO_<?=$i."_
".$j?>')"><?echo
htmlspecialcharsbx(mb_substr($strSql,0,100)).
"..."?></a>&
nbsp;(<?echo
$query[
"COUNT"]?>) </td>
414 <td
class=
"number" valign=
"top"><?
416 foreach (
$query[
"CALLS"] as $call)
420 echo number_format($t/
$query[
"COUNT"], 5);
426 </div>#DIVIDER#<div
class=
"bx-debug-content bx-debug-content-details"><?
428 foreach ($arQueries as $strSql =>
$query)
430 ?><div
id=
"BX_DEBUG_INFO_<?=$i."_
".$j?>" style=
"display:none">
431 <b><?echo Loc::getMessage(
"debug_info_query")?> <?echo $j?>:</b>
434 $strSql = preg_replace(
"/[\\n\\r\\t\\s ]+/",
" ", $strSql);
435 $strSql = preg_replace(
"/^ +/",
"", $strSql);
436 $strSql = preg_replace(
"/ (INNER JOIN|OUTER JOIN|LEFT JOIN|SET|LIMIT) /i",
"\n\\1 ", $strSql);
437 $strSql = preg_replace(
"/(INSERT INTO [A-Z_0-1]+?)\\s/i",
"\\1\n", $strSql);
438 $strSql = preg_replace(
"/(INSERT INTO [A-Z_0-1]+?)([(])/i",
"\\1\n\\2", $strSql);
439 $strSql = preg_replace(
"/([\\s)])(VALUES)([\\s(])/i",
"\\1\n\\2\n\\3", $strSql);
440 $strSql = preg_replace(
"/ (FROM|WHERE|ORDER BY|GROUP BY|HAVING) /i",
"\n\\1\n", $strSql);
443 ?><br /><br /><b><?echo Loc::getMessage(
"debug_info_query_from")?></b><?
446 foreach (
$query[
"CALLS"] as $call)
448 $back_trace = $call[
"TRACE"];
450 if (is_array($back_trace))
452 foreach ($back_trace as
$n => $tr)
454 ?><br /><br /><b>(<?echo
$k.
".".(
$n+1)?>)</b><?
455 echo $tr[
"file"] .
":" . $tr[
"line"] .
"<br /><nobr>" .
htmlspecialcharsbx($tr[
"class"] . $tr[
"type"] . $tr[
"function"]);
462 echo
"</nobr>(".htmlspecialcharsbx(print_r($tr[
"args"],
true)).
")";
475 <b>(<?echo
$k?>)</b> <?echo Loc::getMessage(
"debug_info_query_from_unknown")?>
480 echo Loc::getMessage(
"debug_info_query_time")?> <?echo round($call[
"TIME"], 5)?> <?echo Loc::getMessage(
"debug_info_sec");
494 ?><script>BX_DEBUG_INFO_CACHE_<?=$i?> =
new BX.CDebugDialog();</script><?
496 $obJSPopup->jsPopup =
'BX_DEBUG_INFO_CACHE_'.$i;
497 $obJSPopup->StartDescription(
'bx-core-debug-info');
498 ?><p><?echo Loc::getMessage(
"debug_info_cache_size")?> <?=
CFile::FormatSize($arIncludeDebug[
"CACHE_SIZE"] ?? 0, 0)?></p><?
500 if (isset($arIncludeDebug[
"CACHE"]) && !empty($arIncludeDebug[
"CACHE"]))
503 <div
class=
"bx-debug-content bx-debug-content-table">
504 <table
id=
"cacheDebug<?=$i?>" cellpadding=
"2" cellspacing=
"0" border=
"0">
505 <tr
class=
"heading-sort">
506 <td onclick=
"sortTable('cacheDebug<?=$i?>', 0)">↓&
nbsp;</td>
507 <td onclick=
"sortTable('cacheDebug<?=$i?>', 1)"><?=Loc::getMessage(
"debug_info_cache_table_func");?></td>
508 <td onclick=
"sortTable('cacheDebug<?=$i?>', 2, true)"><?=Loc::getMessage(
"debug_info_cache_table_size");?></td>
509 <td onclick=
"sortTable('cacheDebug', 3)"><?=Loc::getMessage(
"debug_info_cache_file_path");?></td>
512 foreach ($arIncludeDebug[
"CACHE"] as $j => $cacheDebug)
523 <tr
class=
"cache-row">
524 <td
class=
"number"><?echo $j+1?></td>
525 <td><a href=
"javascript:BX_DEBUG_INFO_CACHE_<?=$i?>.ShowDetails('BX_DEBUG_INFO_CACHE_<?=$i."_
".$j?>')"><?echo $cacheDebug[
"callee_func"]?></a></td>
526 <td
class=
"number" sort=
"<?echo $cacheDebug["cache_size
"]?>"><?=
CFile::FormatSize($cacheDebug[
"cache_size"], 0)?></td>
531 </div>#DIVIDER#<div
class=
"bx-debug-content bx-debug-content-details"><?
533 foreach ($arIncludeDebug[
"CACHE"] as $j => $cacheDebug)
535 ?><div
id=
"BX_DEBUG_INFO_CACHE_<?=$i?>_<?=$j?>" style=
"display:none">
536 <b><?=Loc::getMessage(
"debug_info_query_from")?></b><?
539 foreach ($cacheDebug[
"TRACE"] as
$n => $tr)
542 <b>(<?echo (
$n + 1)?>)</b><?
551 echo
"</nobr>(".htmlspecialcharsbx(print_r($tr[
"args"],
true)).
")";
568?><script>var jsDebugTimeWindow =
new BX.CDebugDialog();</script>
569<div
id=
"BX_DEBUG_TIME" class=
"bx-debug-window" style=
"z-index:99; width:660px !important;"><?
570 $obJSPopup->StartDescription(
'bx-core-debug-info');
571 ?><p><?=Loc::getMessage(
"debug_info_page")?> <?=
$APPLICATION->GetCurPage()?></p>
572 <p><?=Loc::getMessage(
"debug_info_comps_cache")?> <?
if(COption::GetOptionString(
"main",
"component_cache_on",
"Y")==
"Y") echo Loc::getMessage(
"debug_info_comps_cache_on");
else echo
"<a href=\"/bitrix/admin/cache.php\"><font class=\"errortext\">".Loc::getMessage(
"debug_info_comps_cache_off").
"</font></a>";?>.</p>
574 if (\
Bitrix\Main\Data\Cache::getShowCacheStat())
576 echo Loc::getMessage(
"debug_info_cache_size").
" ",
CFile::FormatSize(\
Bitrix\Main\Diag\CacheTracker::getCacheStatBytes(), 0);
586 ?><div
id=
"BX_DEBUG_TIME_1">
587 <div
class=
"bx-debug-content bx-debug-content-table">
589<table cellpadding=
"0" cellspacing=
"0" border=
"0" width=
"100%">
593 <td
class=
"number" nowrap><span><?=Loc::getMessage(
"debug_info_page_exec")?></span></td>
594 <td
class=
"number" nowrap><span><?=Loc::getMessage(
"debug_info_sec")?></span></td>
596 <td
class=
"number" nowrap><span><?=Loc::getMessage(
"debug_info_comps_exec")?></span></td>
597 <td
class=
"number" nowrap><span><?=Loc::getMessage(
"debug_info_sec")?></span></td>
600 <td
class=
"number" nowrap><span><?=Loc::getMessage(
"debug_info_queries_exec")?></span></td>
601 <td
class=
"number" nowrap><span><?=Loc::getMessage(
"debug_info_sec")?></span></td>
603 <td
class=
"heading">&
nbsp;</td>
605 <tr
class=
"heading heading-bottom">
609 ?><a
style=
"font-weight:bold !important" href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_1')"><?echo
GetMessage(
"debug_info_whole_page")?></a><?
611 ?><b><?=Loc::getMessage(
"debug_info_whole_page")?></b><?
614 <td
class=
"number" nowrap><b>100%</b></td>
615 <td
class=
"number" nowrap><b><?echo number_format($PAGE, 4)?></b></td>
617 <td
class=
"number" nowrap><b><?echo intval($arAreas[
"PAGE"][
"TRACE"][
"COMPONENT_COUNT"])?></b></td>
618 <td
class=
"number" nowrap><b><?echo number_format($arAreas[
"PAGE"][
"TRACE"][
"COMPONENT_TIME"], 4)?></b></td>
622 <td
class=
"number" nowrap><b><?echo $arAreas[
"PAGE"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"PAGE"][
"TRACE"][
"COMP_QUERY_COUNT"]?></b></td>
623 <td
class=
"number" nowrap><b><?echo number_format($arAreas[
"PAGE"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"PAGE"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?></b></td>
625 <td
class=
"heading">&
nbsp;</td>
631 <p><a
style=
"font-weight:bold !important" href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_2')"><?=Loc::getMessage(
"debug_info_prolog")?></a></p>
633 &
nbsp;&
nbsp;<a href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_3')"><?=Loc::getMessage(
"debug_info_prolog_before")?></a><br>
634 &
nbsp;&
nbsp;<a href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_5')"><?=Loc::getMessage(
"debug_info_prolog_after")?></a><br>
637 <p><b><?=Loc::getMessage(
"debug_info_prolog")?></b></p>
639 &
nbsp;&
nbsp;<?=Loc::getMessage(
"debug_info_prolog_before")?><br>
640 &
nbsp;&
nbsp;<?=Loc::getMessage(
"debug_info_prolog_after")?><br>
644 <td
class=
"number" nowrap>
645 <p><b><?echo number_format($PROLOG/$PAGE*100, 2),
"%"?></b></p>
647 <?echo number_format($PROLOG_BEFORE/$PAGE*100, 2),
"%"?><br>
648 <?echo number_format($PROLOG_AFTER/$PAGE*100, 2),
"%"?><br>
651 <td
class=
"number" nowrap>
652 <p><b><?echo number_format($PROLOG, 4)?></b></p>
654 <?echo number_format($PROLOG_BEFORE, 4)?><br>
655 <?echo number_format($PROLOG_AFTER, 4)?><br>
659 <td
class=
"number" nowrap>
660 <p><b><?echo intval($arAreas[
"PROLOG"][
"TRACE"][
"COMPONENT_COUNT"])?></b></p>
662 <?echo intval($arAreas[
"PROLOG_BEFORE"][
"TRACE"][
"COMPONENT_COUNT"])?><br>
663 <?echo intval($arAreas[
"PROLOG_AFTER"][
"TRACE"][
"COMPONENT_COUNT"])?><br>
666 <td
class=
"number" nowrap>
667 <p><b><?echo number_format($arAreas[
"PROLOG"][
"TRACE"][
"COMPONENT_TIME"], 4)?></b></p>
669 <?echo number_format($arAreas[
"PROLOG_BEFORE"][
"TRACE"][
"COMPONENT_TIME"], 4)?><br>
670 <?echo number_format($arAreas[
"PROLOG_AFTER"][
"TRACE"][
"COMPONENT_TIME"], 4)?><br>
675 <td
class=
"number" nowrap>
676 <p><b><?echo $arAreas[
"PROLOG"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"PROLOG"][
"TRACE"][
"COMP_QUERY_COUNT"]?></b></p>
678 <?echo $arAreas[
"PROLOG_BEFORE"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"PROLOG_BEFORE"][
"TRACE"][
"COMP_QUERY_COUNT"]?><br>
679 <?echo $arAreas[
"PROLOG_AFTER"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"PROLOG_AFTER"][
"TRACE"][
"COMP_QUERY_COUNT"]?><br>
682 <td
class=
"number" nowrap>
683 <p><b><?echo number_format($arAreas[
"PROLOG"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"PROLOG"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?></b></p>
685 <?echo number_format($arAreas[
"PROLOG_BEFORE"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"PROLOG_BEFORE"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?><br>
686 <?echo number_format($arAreas[
"PROLOG_AFTER"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"PROLOG_AFTER"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?><br>
696 <p><a
style=
"font-weight:bold !important" href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_6')"><?=Loc::getMessage(
"debug_info_work_area")?></a></p>
698 <p><b><?=Loc::getMessage(
"debug_info_work_area")?></b></p>
701 <td
class=
"number" nowrap><p><b><?echo number_format($WORK_AREA/$PAGE*100, 2),
"%"?></b></p></td>
702 <td
class=
"number" nowrap><p><b><?echo number_format($WORK_AREA, 4)?></b></p></td>
704 <td
class=
"number" nowrap><b><?echo intval($arAreas[
"WORK_AREA"][
"TRACE"][
"COMPONENT_COUNT"])?></b></td>
705 <td
class=
"number" nowrap><b><?echo number_format($arAreas[
"WORK_AREA"][
"TRACE"][
"COMPONENT_TIME"], 4)?></b></td>
708 <td
class=
"number" nowrap><p><b><?echo $arAreas[
"WORK_AREA"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"WORK_AREA"][
"TRACE"][
"COMP_QUERY_COUNT"]?></b></p></td>
709 <td
class=
"number" nowrap><p><b><?echo number_format($arAreas[
"WORK_AREA"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"WORK_AREA"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?></b></p></td>
717 <p><a
style=
"font-weight:bold !important" href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_7')"><?=Loc::getMessage(
"debug_info_epilog")?></a></p>
719 &
nbsp;&
nbsp;<a href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_8')"><?=Loc::getMessage(
"debug_info_epilog_before")?></a><br>
720 &
nbsp;&
nbsp;<a href=
"javascript:jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_9')"><?=Loc::getMessage(
"debug_info_epilog_after")?></a><br>
723 <p><b><?=Loc::getMessage(
"debug_info_epilog")?></b></p>
725 &
nbsp;&
nbsp;<?=Loc::getMessage(
"debug_info_epilog_before")?><br>
726 &
nbsp;&
nbsp;<?=Loc::getMessage(
"debug_info_epilog_after")?><br>
730 <td
class=
"number" nowrap>
731 <p><b><?echo number_format($EPILOG/$PAGE*100, 2),
"%"?></b></p>
733 <?echo number_format($EPILOG_BEFORE/$PAGE*100, 2),
"%"?><br>
734 <?echo number_format($EPILOG_AFTER/$PAGE*100, 2),
"%"?><br>
737 <td
class=
"number" nowrap>
738 <p><b><?echo number_format($EPILOG, 4)?></b></p>
740 <?echo number_format($EPILOG_BEFORE, 4)?><br>
741 <?echo number_format($EPILOG_AFTER, 4)?><br>
744 <?
if ($bShowComps):?>
745 <td
class=
"number" nowrap>
746 <p><b><?echo intval($arAreas[
"EPILOG"][
"TRACE"][
"COMPONENT_COUNT"])?></b></p>
748 <?echo intval($arAreas[
"EPILOG_BEFORE"][
"TRACE"][
"COMPONENT_COUNT"])?><br>
749 <?echo intval($arAreas[
"EPILOG_AFTER"][
"TRACE"][
"COMPONENT_COUNT"])?><br>
752 <td
class=
"number" nowrap>
753 <p><b><?echo number_format($arAreas[
"EPILOG"][
"TRACE"][
"COMPONENT_TIME"], 4)?></b></p>
755 <?echo number_format($arAreas[
"EPILOG_BEFORE"][
"TRACE"][
"COMPONENT_TIME"], 4)?><br>
756 <?echo number_format($arAreas[
"EPILOG_AFTER"][
"TRACE"][
"COMPONENT_TIME"], 4)?><br>
761 <td
class=
"number" nowrap>
762 <p><b><?echo $arAreas[
"EPILOG"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"EPILOG"][
"TRACE"][
"COMP_QUERY_COUNT"]?></b></p>
764 <?echo $arAreas[
"EPILOG_BEFORE"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"EPILOG_BEFORE"][
"TRACE"][
"COMP_QUERY_COUNT"]?><br>
765 <?echo $arAreas[
"EPILOG_AFTER"][
"TRACE"][
"QUERY_COUNT"]+$arAreas[
"EPILOG_AFTER"][
"TRACE"][
"COMP_QUERY_COUNT"]?><br>
768 <td
class=
"number" nowrap>
769 <p><b><?echo number_format($arAreas[
"EPILOG"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"EPILOG"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?></b></p>
771 <?echo number_format($arAreas[
"EPILOG_BEFORE"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"EPILOG_BEFORE"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?><br>
772 <?echo number_format($arAreas[
"EPILOG_AFTER"][
"TRACE"][
"QUERY_TIME"]+$arAreas[
"EPILOG_AFTER"][
"TRACE"][
"COMP_QUERY_TIME"], 4)?><br>
781 </div>#DIVIDER#<?
if($bShowComps):?><div
class=
"bx-debug-content bx-debug-content-table"><?
782 foreach ($arAreas as $id => $arArea):
783 ?><div
id=
"BX_DEBUG_TIME_1_<?echo $arArea["NUM
"]?>" style=
"display:none">
784 <table cellpadding=
"0" cellspacing=
"0" border=
"0" width=
"100%"><?
789 if (isset($arIncludeDebug[
"REL_PATH"]) && in_array($arIncludeDebug[
"BX_STATE"], $arArea[
"FLT"]))
791 $tim += $arIncludeDebug[
"TIME"];
794 if ($tim > $arArea[
"TIME"]) $tim = $arArea[
"TIME"];
797 <td
class=
"number" valign=
"top">0</td>
800 ?><a
title=
"<?echo Loc::getMessage("debug_info_query_title
")?>" href=
"javascript:BX_DEBUG_INFO_<?echo $arArea["IND
"]?>.Show(); BX_DEBUG_INFO_<?echo $arArea['IND']?>.ShowDetails('BX_DEBUG_INFO_<?echo $arArea['IND']?>_1');"><?echo
GetMessage(
"debug_info_raw_code")?></a><?
802 echo Loc::getMessage(
"debug_info_raw_code");
806 <td
class=
"number">&
nbsp;<?
807 if($arArea[
"TRACE"][
"CACHE_SIZE"])
810 <td
class=
"number"><?
if($arArea[
"TIME"] > 0):?><?echo number_format((1-$tim/$arArea[
"TIME"])*100, 2)?>%<?
endif?></td>
811 <td
class=
"number"><?echo number_format($arArea[
"TIME"] - $tim, 4)?> <?echo Loc::getMessage(
"debug_info_sec")?></td>
812 <td
class=
"number"><?echo intval($arArea[
"TRACE"][
"QUERY_COUNT"])?> <?echo Loc::getMessage(
"debug_info_query_short")?></td>
813 <td
class=
"number"><?echo number_format($arArea[
"TRACE"][
"QUERY_TIME"], 4)?> <?echo Loc::getMessage(
"debug_info_sec")?></td>
818 if (isset($arIncludeDebug[
"REL_PATH"]) && in_array($arIncludeDebug[
"BX_STATE"], $arArea[
"FLT"])):
820 <td
class=
"number" valign=
"top"><?echo
$k?></td>
822 if ($arIncludeDebug[
"LEVEL"] > 0)
824 echo str_repeat(
" ", $arIncludeDebug[
"LEVEL"]);
827 ?><a
title=
"<?echo Loc::getMessage("debug_info_query_title
")?>" href=
"javascript:BX_DEBUG_INFO_<?echo $i?>.Show(); BX_DEBUG_INFO_<?echo $i?>.ShowDetails('BX_DEBUG_INFO_<?echo $i?>_1');"><?echo
htmlspecialcharsbx($arIncludeDebug[
"REL_PATH"])?></a><?
833 switch ($arIncludeDebug[
"CACHE_TYPE"])
835 case "N": echo Loc::getMessage(
"debug_info_cache_off");
break;
836 case "Y": echo Loc::getMessage(
"debug_info_cache_on");
break;
837 default: echo Loc::getMessage(
"debug_info_cache_auto");
break;
840 <td
class=
"number" nowrap>&
nbsp;<?
841 if ($arIncludeDebug[
"CACHE_SIZE"])
846 <td
class=
"number" nowrap><?
if ($arArea[
"TIME"] > 0):?><?echo number_format($arIncludeDebug[
"TIME"]/$arArea[
"TIME"]*100, 2)?>%<?
endif?></td>
847 <td
class=
"number" nowrap><?echo number_format($arIncludeDebug[
"TIME"], 4)?> <?echo Loc::getMessage(
"debug_info_sec")?></td>
848 <td
class=
"number" nowrap><?echo intval($arIncludeDebug[
"QUERY_COUNT"])?> <?echo Loc::getMessage(
"debug_info_query_short")?></td>
849 <td
class=
"number" nowrap><?echo number_format($arIncludeDebug[
"QUERY_TIME"], 4)?> <?echo Loc::getMessage(
"debug_info_sec")?></td>
866 isset($_GET[
"show_sql_stat"])
867 && $_GET[
"show_sql_stat"] ===
"Y"
868 && isset($_GET[
"show_page_exec_time"])
869 && $_GET[
"show_page_exec_time"] ===
"Y"
870 && isset($_GET[
"show_sql_stat_immediate"])
871 && $_GET[
"show_sql_stat_immediate"] ===
"Y"
872 && preg_match(
"#/admin/perfmon_hit_list.php#",
$_SERVER[
"HTTP_REFERER"])
875 echo
"<script>BX.ready(function() {jsDebugTimeWindow.Show(); jsDebugTimeWindow.ShowDetails('BX_DEBUG_TIME_1_1');});</script>";
static getCacheTracking()
static FormatSize($size, $precision=2)
static Init($arExt=array(), $bReturn=false)
if( $bShowExtTime) elseif($bShowTime) $totalQueryCount
if($bShowTime|| $bShowStat|| $bShowCacheStat) $bShowExtTime
const START_EXEC_EPILOG_AFTER_1
const START_EXEC_EPILOG_BEFORE_1
hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> height
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
bx popup label bx hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> bx_view_property_<?=$propertyIndex?> overflow
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
bx_acc_lim_group_list limitGroupList[] multiple<?=$group[ 'ID']?> ID selected margin top
hidden mSiteList<?=htmlspecialcharsbx(serialize( $siteList))?><?=htmlspecialcharsbx( $siteList[ $j]["ID"])?> _Propery<? if(((COption::GetOptionString( $module_id, "different_set", "N")=="Y") &&( $j !=0))||(COption::GetOptionString( $module_id, "different_set", "N")=="N")) echo "display: none;"?> top adm detail content cell l top adm detail content cell r heading center center ID left
$_SERVER["DOCUMENT_ROOT"]
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
GetMessage($name, $aReplace=null)
const START_EXEC_PROLOG_AFTER_1
const START_EXEC_PROLOG_AFTER_2($APPLICATION->GetShowIncludeAreas())
global_menu_<?echo $menu["menu_id"]?> adm main menu item icon adm main menu item text text adm main menu hover adm submenu menucontainer menu_id menu_id items_id items_id desktop menu_id block none adm global submenu<?=($subMenuDisplay=="block" ? " adm-global-submenu-active" :"")?> global_submenu_<?echo $menu["menu_id"]?> text MAIN_PR_ADMIN_FAV items adm submenu items wrap adm submenu items stretch wrap BX adminMenu itemsStretchScroll()"> <table class if (!empty( $menu["items"])) elseif ( $menu[ 'menu_id']=='desktop') if ( $menu[ 'menu_id']=='desktop') endforeach
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
<? endif;?> window document title
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
$GLOBALS['_____370096793']