改进吞吐率计算

This commit is contained in:
thinkphp
2016-04-03 20:01:17 +08:00
parent ba7e7387ba
commit 45e593ec08
6 changed files with 6 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ class File
$current_uri = "cmd:" . implode(' ', $_SERVER['argv']);
}
$runtime = microtime(true) - START_TIME;
$reqs = number_format(1 / $runtime, 2);
$reqs = number_format(1 / number_format($runtime, 8), 2);
$runtime = number_format($runtime, 6);
$time_str = " [运行时间:{$runtime}s] [吞吐率:{$reqs}req/s]";
$memory_use = number_format((memory_get_usage() - START_MEM) / 1024, 2);