mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进
This commit is contained in:
1
base.php
1
base.php
@@ -9,7 +9,6 @@
|
|||||||
// | Author: liu21st <liu21st@gmail.com>
|
// | Author: liu21st <liu21st@gmail.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
ini_set("precision", 18);
|
|
||||||
define('THINK_VERSION', '5.0.0 RC4');
|
define('THINK_VERSION', '5.0.0 RC4');
|
||||||
define('THINK_START_TIME', microtime(true));
|
define('THINK_START_TIME', microtime(true));
|
||||||
define('THINK_START_MEM', memory_get_usage());
|
define('THINK_START_MEM', memory_get_usage());
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class Console
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 获取基本信息
|
// 获取基本信息
|
||||||
$runtime = round(microtime(true) - THINK_START_TIME, 10);
|
$runtime = number_format(microtime(true) - THINK_START_TIME, 10);
|
||||||
$reqs = number_format(1 / $runtime, 2);
|
$reqs = number_format(1 / $runtime, 2);
|
||||||
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class Html
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 获取基本信息
|
// 获取基本信息
|
||||||
$runtime = round(microtime(true) - THINK_START_TIME, 20);
|
$runtime = number_format(microtime(true) - THINK_START_TIME, 10);
|
||||||
$reqs = number_format(1 / $runtime, 2);
|
$reqs = number_format(1 / $runtime, 2);
|
||||||
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ class File
|
|||||||
} else {
|
} else {
|
||||||
$current_uri = "cmd:" . implode(' ', $_SERVER['argv']);
|
$current_uri = "cmd:" . implode(' ', $_SERVER['argv']);
|
||||||
}
|
}
|
||||||
$runtime = round(microtime(true) - THINK_START_TIME, 10);
|
|
||||||
|
$runtime = number_format(microtime(true) - THINK_START_TIME, 10);
|
||||||
$reqs = number_format(1 / $runtime, 2);
|
$reqs = number_format(1 / $runtime, 2);
|
||||||
$time_str = ' [运行时间:' . number_format($runtime, 6) . '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_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class Socket
|
|||||||
if (!$this->check()) {
|
if (!$this->check()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$runtime = round(microtime(true) - THINK_START_TIME, 20);
|
$runtime = number_format(microtime(true) - THINK_START_TIME, 10);
|
||||||
$reqs = number_format(1 / $runtime, 2);
|
$reqs = number_format(1 / $runtime, 2);
|
||||||
$time_str = ' [运行时间:' . number_format($runtime, 6) . '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_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user