You appear to be a bot. Output may be restricted
Description
Report trace action count on shutdownHere we produce the output multiple times.
- WordPress wp_actions table – which may include some actions invoked before oik-action processing was activated
- bw_action_counts – the actions and filters invoked since oik-action counting was activated
- bw_action_counts sorted by most used – to show how much work WordPress is doing
- bw_action_counts sorted by name.
- Count of the number of unique hooks invoked
- Count of the total number of action/filter hooks invoked.
- First view of the counts taking into account nested actions and filters
- Action timings timing of $wp_actions that have implementing functions.
Usage
bw_trace_count_report();
Parameters
Returns
voidSource
File name: oik-bwtrace/includes/oik-action-counts.phpLines:
1 to 31 of 31
function bw_trace_count_report() { global $wp_actions; global $bw_action_counts; //bw_trace( $wp_actions, __FUNCTION__, __LINE__, __FILE__, "wp_actions" ); //bw_trace( $bw_action_counts, __FUNCTION__, __LINE__, __FILE__, "bw_action_counts" ); bw_trace_create_hook_links( $wp_actions, "wp_actions" ); bw_trace_create_hook_links( $bw_action_counts, "bw_action_counts" ); //$merged = array_merge( $bw_action_counts, $wp_actions ); if ( count( $bw_action_counts ) ) { $merged = $bw_action_counts; arsort( $merged ); //bw_trace( $merged, __FUNCTION__, __LINE__, __FILE__, "most used" ); bw_trace_create_hook_links( $merged, "most used", true ); ksort( $merged ); //bw_trace( $merged, __FUNCTION__, __LINE__, __FILE__, "by hook name" ); bw_trace_create_hook_links( $merged, "by hook name" ); bw_trace( count( $merged), __FUNCTION__, __LINE__, __FILE__, "count hooks" ); bw_trace( array_sum( $merged), __FUNCTION__, __LINE__, __FILE__, "total hooks" ); } global $bw_action_counts_tree; //bw_trace( $bw_action_counts_tree, __FUNCTION__, __LINE__, __FILE__, "action counts tree" ); bw_trace_create_hook_links( $bw_action_counts_tree, "bw_action_counts_tree" ); bw_trace_action_timings( $wp_actions, "Action timings"); }View on GitHub View on Trac