Browse Source

Update Core\DB

Track time for PDO::__construct().
Visman 3 năm trước cách đây
mục cha
commit
e435297865
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      app/Core/DB.php

+ 4 - 0
app/Core/DB.php

@@ -74,8 +74,12 @@ class DB extends PDO
             self::ATTR_STATEMENT_CLASS    => [DBStatement::class, [$this]],
             self::ATTR_STATEMENT_CLASS    => [DBStatement::class, [$this]],
         ];
         ];
 
 
+        $start  = \microtime(true);
+
         parent::__construct($dsn, $username, $password, $options);
         parent::__construct($dsn, $username, $password, $options);
 
 
+        $this->saveQuery('PDO::__construct()', \microtime(true) - $start, false);
+
         $this->beginTransaction();
         $this->beginTransaction();
     }
     }