Skip to content

Instantly share code, notes, and snippets.



Created Jul 10, 2017
What would you like to do?
<?php if (current_user_can('update_core')) { ?>
<p><?php echo get_num_queries() ?> queries. <?php if (function_exists('memory_get_usage')) { $unit=array('b','kb','mb','gb','tb','pb'); echo @round(memory_get_usage(true)/pow(1024,($i=floor(log(memory_get_usage(true),1024)))),2).' '.$unit[$i]; ?> Memory usage. <?php } timer_stop(1) ?> seconds.</p>
<?php } ?>
24 queries. 38 mb Memory usage. 0,656 seconds.
101 queries. 38 mb Memory usage. 2,037 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment