1
0
mirror of https://github.com/pattern-lab/patternlab-php.git synced 2025-01-29 11:59:16 +01:00

adding RAM usage to the report output

This commit is contained in:
Dave Olsen 2014-01-21 15:25:58 -05:00
parent a43822f00c
commit 153a0b0cb9

View File

@ -116,12 +116,13 @@ class Generator extends Builder {
// print out how long it took to generate the site
if ($timePL) {
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
print "site generation took ".$totaltime." seconds...\n";
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
$mem = round((memory_get_peak_usage(true)/1024)/1024,2);
print "site generation took ".$totaltime." seconds and used ".$mem."MB of memory...\n";
}
}