浏览代码

Update Core\DB

Track time for PDO::__construct().
Visman 3 年之前
父节点
当前提交
e435297865
共有 1 个文件被更改,包括 4 次插入0 次删除
  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]],
         ];
 
+        $start  = \microtime(true);
+
         parent::__construct($dsn, $username, $password, $options);
 
+        $this->saveQuery('PDO::__construct()', \microtime(true) - $start, false);
+
         $this->beginTransaction();
     }