From d4d2a5352e17435185ecbc1bc637e96f953ce3d6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 2 Jun 2013 22:55:52 +0200 Subject: [PATCH] More debugging --- wcfsetup/install/files/lib/system/WCFSetup.class.php | 6 +++++- .../files/lib/system/database/util/SQLParser.class.php | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 64c9073f00..7d889ea878 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -730,7 +730,11 @@ class WCFSetup extends WCF { $GLOBALS['__db'] = array( 'parse' => 0, 'modify' => 0, - 'insert' => 0 + 'insert' => 0, + 'tableCount' => 0, + 'table' => 0, + 'default' => 0, + 'defaultCount' => 0 ); // execute sql queries diff --git a/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php b/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php index 48223d7949..0a7cd7e246 100644 --- a/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php +++ b/wcfsetup/install/files/lib/system/database/util/SQLParser.class.php @@ -114,7 +114,10 @@ class SQLParser { } } + $s = microtime(true); $this->executeCreateTableStatement($tableName, $columns, $indices); + $GLOBALS['__db']['tableCount']++; + $GLOBALS['__db']['table'] += round(microtime(true) - $s, 3); } break; @@ -201,7 +204,10 @@ class SQLParser { case 'INSERT': case 'UPDATE': case 'DELETE': + $s = microtime(true); $this->executeStandardStatement($query); + $GLOBALS['__db']['defaultCount']++; + $GLOBALS['__db']['default'] += round(microtime(true) - $s, 3); break; } } -- 2.20.1