Skip to content

Instantly share code, notes, and snippets.

View bradp's full-sized avatar
🏖️
beach vibes

Brad Parbs bradp

🏖️
beach vibes
View GitHub Profile
@bradp
bradp / gist:2863967
Created June 3, 2012 15:53
WordPress Database Query Output Monitor
<?php
function performance( $visible = false ) {
$stat = sprintf( '%d queries in %.3f seconds, using %.2fMB memory',
get_num_queries(),
timer_stop( 0, 3 ),
memory_get_peak_usage() / 1024 / 1024
);