Skip to content

Instantly share code, notes, and snippets.

@pushandplay
Forked from Fi1osof/gist:5062419
Created March 5, 2013 13:54
Show Gist options
  • Save pushandplay/5090457 to your computer and use it in GitHub Desktop.
Save pushandplay/5090457 to your computer and use it in GitHub Desktop.
<?php
$memory = round(memory_get_usage()/1024/1024, 4).' Mb';
print "<div>Memory: {$memory}</div>";
$totalTime= ($modx->getMicroTime() - $modx->startTime);
$queryTime= $modx->queryTime;
$queryTime= sprintf("%2.4f s", $queryTime);
$queries= isset ($modx->executedQueries) ? $modx->executedQueries : 0;
$totalTime= sprintf("%2.4f s", $totalTime);
$phpTime= $totalTime - $queryTime;
$phpTime= sprintf("%2.4f s", $phpTime);
print "<div>TotalTime: {$totalTime}</div>";
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment