public static function PHP_Timer::resourceUsage in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-timer/src/Timer.php \PHP_Timer::resourceUsage()
Returns the resources (time, memory) of the request as a string.
Return value
string
2 calls to PHP_Timer::resourceUsage()
- PHPUnit_TextUI_ResultPrinter::printHeader in vendor/
phpunit/ phpunit/ src/ TextUI/ ResultPrinter.php - PHP_TimerTest::testResourceUsage in vendor/
phpunit/ php-timer/ Tests/ TimerTest.php - @covers PHP_Timer::resourceUsage
File
- vendor/
phpunit/ php-timer/ src/ Timer.php, line 91
Class
- PHP_Timer
- Utility class for timing.
Code
public static function resourceUsage() {
return sprintf('Time: %s, Memory: %4.2fMb', self::timeSinceStartOfRequest(), memory_get_peak_usage(true) / 1048576);
}