think\Debug::getThroughputRate PHP Method

getThroughputRate() public static method

获取当前访问的吞吐率情况
public static getThroughputRate ( ) : string
return string
    public static function getThroughputRate()
    {
        return number_format(1 / self::getUseTime(), 2) . 'req/s';
    }

Usage Example

コード例 #1
0
ファイル: debugTest.php プロジェクト: yuhongjie/think
 /**
  * @covers think\Debug::getThroughputRate
  * @todo Implement testGetThroughputRate().
  */
 public function testGetThroughputRate()
 {
     usleep(100000);
     $throughputRate = \think\Debug::getThroughputRate();
     $this->assertLessThan(10, $throughputRate);
 }