From 3a3afc28610852b75f5b33ce94ee83e34071f7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 27 Apr 2021 10:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/Command.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Database/Command.php b/Database/Command.php index bca84243..d83fcf10 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -10,12 +10,11 @@ declare(strict_types=1); namespace Database; -use Snowflake\Abstracts\Component; use Exception; use PDO; use PDOStatement; +use Snowflake\Abstracts\Component; use Snowflake\Core\Json; -use Snowflake\Exception\ComponentException; /** * Class Command @@ -126,6 +125,9 @@ class Command extends Component } else { $result = $this->search($type); } + if (microtime(true) - $time >= 0.03) { + $this->warning('get client use time ' . (microtime(true) - $time)); + } if ($this->prepare) { $this->prepare->closeCursor(); }