Measure the execution time of a specific WP_Query and log it to the browser console.
- Activate the plugin
- Pass all of the the
wp_query_idinstances you want to target as an array to thewpqet_target_query_idfilter - Review the console to view the execution time for your queries
Filter example
/**
* Target Query ID
*
* @return string
*/
function acme_target_query_id_filter( $ids ) {
$ids = array( 'your_query_id', 'another_id_here' );
return $ids;
}
add_filter( 'wpqet_target_query_id', 'acme_target_query_id_filter' );
Example output
WP_Query Execution Time for wpd_products_widget: 0.0337 seconds