mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-03 05:52:48 +08:00
改进运行时间显示精度
This commit is contained in:
@@ -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[] = [
|
||||
|
||||
Reference in New Issue
Block a user