function Timing::printRunTime
Print information about the run.
Parameters
boolean $force If TRUE, prints the output even if it has: already been printed during the run.
Return value
void
9 calls to Timing::printRunTime()
- Cbf::generate in vendor/
squizlabs/ php_codesniffer/ src/ Reports/ Cbf.php - Prints a summary of fixed files.
- Code::generate in vendor/
squizlabs/ php_codesniffer/ src/ Reports/ Code.php - Prints all errors and warnings for each file processed.
- Full::generate in vendor/
squizlabs/ php_codesniffer/ src/ Reports/ Full.php - Prints all errors and warnings for each file processed.
- Info::generate in vendor/
squizlabs/ php_codesniffer/ src/ Reports/ Info.php - Prints the recorded metrics.
- Runner::runPHPCBF in vendor/
squizlabs/ php_codesniffer/ src/ Runner.php - Run the PHPCBF script.
File
-
vendor/
squizlabs/ php_codesniffer/ src/ Util/ Timing.php, line 110
Class
Namespace
PHP_CodeSniffer\UtilCode
public static function printRunTime($force = false) {
if ($force === false && self::$printed === true) {
// A double call.
return;
}
if (self::$startTime === null) {
// Timing was never started.
return;
}
$duration = self::getDuration();
$duration = self::getHumanReadableDuration($duration);
$mem = round(memory_get_peak_usage(true) / (1024 * 1024), 2) . 'MB';
echo "Time: {$duration}; Memory: {$mem}" . PHP_EOL . PHP_EOL;
self::$printed = true;
}