mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
START_TIME START_MEM 更改为 THINK_START_TIME THINK_START_MEM
This commit is contained in:
@@ -63,7 +63,7 @@ class Debug
|
||||
*/
|
||||
public static function getUseTime($dec = 6)
|
||||
{
|
||||
return number_format((microtime(true) - START_TIME), $dec);
|
||||
return number_format((microtime(true) - THINK_START_TIME), $dec);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,9 +42,9 @@ class Console
|
||||
public function output(array $log = [])
|
||||
{
|
||||
// 获取基本信息
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - START_TIME;
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME;
|
||||
$reqs = number_format(1 / $runtime, 2);
|
||||
$mem = number_format((memory_get_usage() - START_MEM) / 1024, 2);
|
||||
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) {
|
||||
$uri = $_SERVER['SERVER_PROTOCOL'] . ' ' . $_SERVER['REQUEST_METHOD'] . ' : ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
|
||||
@@ -43,9 +43,9 @@ class Html
|
||||
{
|
||||
|
||||
// 获取基本信息
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - START_TIME;
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME;
|
||||
$reqs = number_format(1 / $runtime, 2);
|
||||
$mem = number_format((memory_get_usage() - START_MEM) / 1024, 2);
|
||||
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
|
||||
// 页面Trace信息
|
||||
if (isset($_SERVER['HTTP_HOST'])) {
|
||||
|
||||
@@ -65,10 +65,10 @@ class Socket
|
||||
if (!$this->check()) {
|
||||
return false;
|
||||
}
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - START_TIME;
|
||||
$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]";
|
||||
$memory_use = number_format((memory_get_usage() - START_MEM) / 1024, 2);
|
||||
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
$memory_str = " [内存消耗:{$memory_use}kb]";
|
||||
$file_load = " [文件加载:" . count(get_included_files()) . "]";
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ class File
|
||||
} else {
|
||||
$current_uri = "cmd:" . implode(' ', $_SERVER['argv']);
|
||||
}
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - START_TIME;
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME;
|
||||
$reqs = number_format(1 / $runtime, 2);
|
||||
$time_str = " [运行时间:{$runtime}s] [吞吐率:{$reqs}req/s]";
|
||||
$memory_use = number_format((memory_get_usage() - START_MEM) / 1024, 2);
|
||||
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
$memory_str = " [内存消耗:{$memory_use}kb]";
|
||||
$file_load = " [文件加载:" . count(get_included_files()) . "]";
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ class Sae
|
||||
} else {
|
||||
$current_uri = "cmd:" . implode(' ', $_SERVER['argv']);
|
||||
}
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - START_TIME;
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME;
|
||||
$reqs = number_format(1 / $runtime, 2);
|
||||
$time_str = " [运行时间:{$runtime}s] [吞吐率:{$reqs}req/s]";
|
||||
$memory_use = number_format((memory_get_usage() - START_MEM) / 1024, 2);
|
||||
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
$memory_str = " [内存消耗:{$memory_use}kb]";
|
||||
$file_load = " [文件加载:" . count(get_included_files()) . "]";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user