More debugging
authorAlexander Ebert <ebert@woltlab.com>
Sun, 2 Jun 2013 20:55:52 +0000 (22:55 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 2 Jun 2013 20:55:52 +0000 (22:55 +0200)
wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/lib/system/database/util/SQLParser.class.php

index 64c9073f0048d0fdca4455144f06366890d4f399..7d889ea878814e6b803be92d3e9ea81028c6c23b 100644 (file)
@@ -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
index 48223d794955283f45c5cf85b2a52828005e2d19..0a7cd7e2465024f59a9e683de90df907617ba725 100644 (file)
@@ -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;
                }
        }