From a08f49ea517371134e478ee9fe27e876a7ff6181 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Fri, 1 Nov 2024 01:58:29 +0000 Subject: [PATCH] * [trace] add number_format. --- lib/trace/trace.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/trace/trace.class.php b/lib/trace/trace.class.php index 78d26b1671..c351d3895b 100644 --- a/lib/trace/trace.class.php +++ b/lib/trace/trace.class.php @@ -85,11 +85,10 @@ class trace /* 达梦数据库不支持下面的语法,直接跳过。The */ if($config->db->driver === 'dm') return; - ini_set('serialize_precision', 14); - ini_set('precision', 14); - $profiling = $this->dao->dbh->query('SHOW PROFILES')->fetchAll(PDO::FETCH_ASSOC); + foreach($profiling as $key => $profile) $profiling[$key]['Duration'] = number_format($profile['Duration'], 4); + $this->trace['profiles'] = $profiling; }