diff options
author | Simon Rettberg | 2018-03-05 15:45:57 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-03-05 15:45:57 +0100 |
commit | b6daee1f526bd1cd9cb661304f156cbf0dc24c64 (patch) | |
tree | 4dfe9c17416c2ec75641e1f3436607ac26d48d74 | |
parent | [inc/TaskmanagerCallback] More details on error logging (diff) | |
download | slx-admin-b6daee1f526bd1cd9cb661304f156cbf0dc24c64.tar.gz slx-admin-b6daee1f526bd1cd9cb661304f156cbf0dc24c64.tar.xz slx-admin-b6daee1f526bd1cd9cb661304f156cbf0dc24c64.zip |
[inc/Util] Print profiling info to error_log on redirect
-rw-r--r-- | inc/util.inc.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php index 69eaf941..c0617310 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -179,6 +179,13 @@ SADFACE; $location .= '&' . implode('&', self::$redirectParams); } } + if (CONFIG_DEBUG) { + global $global_start; + $duration = microtime(true) - $global_start; + error_log('Redirect: ' . round($duration, 3) . 's, ' + . Database::getQueryCount() . ' queries, ' + . round(Database::getQueryTime(), 3) . 's query time total'); + } Header('Location: ' . $location); exit(0); } |