* [trace] add number_format.

This commit is contained in:
sunguangming
2024-11-04 08:26:08 +08:00
committed by 刘刚
parent e2019e3d43
commit a08f49ea51
+2 -3
View File
@@ -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;
}