diff --git a/library/think/debug/Console.php b/library/think/debug/Console.php index fa7e912a..6933d5af 100644 --- a/library/think/debug/Console.php +++ b/library/think/debug/Console.php @@ -60,13 +60,13 @@ class Console if (isset($_SERVER['HTTP_HOST'])) { $uri = $_SERVER['SERVER_PROTOCOL'] . ' ' . $_SERVER['REQUEST_METHOD'] . ' : ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } else { - $uri = "cmd:" . implode(' ', $_SERVER['argv']); + $uri = 'cmd:' . implode(' ', $_SERVER['argv']); } // 页面Trace信息 $base = [ '请求信息' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']) . ' ' . $uri, - '运行时间' => "{$runtime}s [ 吞吐率:{$reqs}req/s ] 内存消耗:{$mem}kb 文件加载:" . count(get_included_files()), + '运行时间' => number_format($runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), '查询信息' => Db::$queryTimes . ' queries ' . Db::$executeTimes . ' writes ', '缓存信息' => Cache::$readTimes . ' reads,' . Cache::$writeTimes . ' writes', '配置加载' => count(Config::get()), diff --git a/library/think/debug/Html.php b/library/think/debug/Html.php index 8425cadc..a1d42fb5 100644 --- a/library/think/debug/Html.php +++ b/library/think/debug/Html.php @@ -61,11 +61,11 @@ class Html if (isset($_SERVER['HTTP_HOST'])) { $uri = $_SERVER['SERVER_PROTOCOL'] . ' ' . $_SERVER['REQUEST_METHOD'] . ' : ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } else { - $uri = "cmd:" . implode(' ', $_SERVER['argv']); + $uri = 'cmd:' . implode(' ', $_SERVER['argv']); } $base = [ '请求信息' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']) . ' ' . $uri, - '运行时间' => "{$runtime}s [ 吞吐率:{$reqs}req/s ] 内存消耗:{$mem}kb 文件加载:" . count(get_included_files()), + '运行时间' => number_format($runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), '查询信息' => Db::$queryTimes . ' queries ' . Db::$executeTimes . ' writes ', '缓存信息' => Cache::$readTimes . ' reads,' . Cache::$writeTimes . ' writes', '配置加载' => count(Config::get()), diff --git a/library/think/debug/Socket.php b/library/think/debug/Socket.php index 3fe9c2d0..fb787e19 100644 --- a/library/think/debug/Socket.php +++ b/library/think/debug/Socket.php @@ -68,15 +68,15 @@ class Socket } $runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME; $reqs = number_format(1 / number_format($runtime, 8), 2); - $time_str = " [运行时间:{$runtime}s][吞吐率:{$reqs}req/s]"; + $time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]'; $memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2); - $memory_str = " [内存消耗:{$memory_use}kb]"; - $file_load = " [文件加载:" . count(get_included_files()) . "]"; + $memory_str = ' [内存消耗:' . $memory_use . 'kb]'; + $file_load = ' [文件加载:' . count(get_included_files()) . ']'; if (isset($_SERVER['HTTP_HOST'])) { $current_uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } else { - $current_uri = "cmd:" . implode(' ', $_SERVER['argv']); + $current_uri = 'cmd:' . implode(' ', $_SERVER['argv']); } // 基本信息 $trace[] = [