This commit is contained in:
thinkphp
2016-07-28 10:37:11 +08:00
parent 5d5a080819
commit 3357768d14
5 changed files with 5 additions and 5 deletions

View File

@@ -9,7 +9,6 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
ini_set("precision", 18);
define('THINK_VERSION', '5.0.0 RC4');
define('THINK_START_TIME', microtime(true));
define('THINK_START_MEM', memory_get_usage());

View File

@@ -53,7 +53,7 @@ class Console
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);
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);

View File

@@ -53,7 +53,7 @@ class Html
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);
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);

View File

@@ -54,7 +54,8 @@ class File
} else {
$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);
$time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]';
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);

View File

@@ -63,7 +63,7 @@ class Socket
if (!$this->check()) {
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);
$time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]';
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);