Created
June 29, 2016 12:04
-
-
Save shoman4eg/be959e097007c3790e0e09c3f05f5d2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
$GLOBALS["DB"]->ShowSqlStat = true; | |
$application = \Bitrix\Main\Application::getInstance(); | |
$connection = $application->getConnection(); | |
$connection->startTracker(); | |
$sqlTracker = $connection->getTracker(); | |
// Сюда вставить sql запрос. | |
var_dump($sqlTracker->getTime()); | |
var_dump($sqlTracker->getCounter()); | |
var_dump($sqlTracker->getQueries()); | |
$GLOBALS["DB"]->ShowSqlStat = false; | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment