public static function 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 drupal/core/vendor/phpunit/phpunit/PHPUnit/TextUI/ResultPrinter.php
PHP_TimerTest::testResourceUsage in drupal/core/vendor/phpunit/php-timer/Tests/TimerTest.php
@covers PHP_Timer::resourceUsage

File

drupal/core/vendor/phpunit/php-timer/PHP/Timer.php, line 139

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);
}