bobbingwide / oik-bwtrace

debug trace for WordPress
https://www.oik-plugins.com/oik-plugins/oik-bwtrace-debug-trace-for-wordpress/
GNU General Public License v2.0
6 stars 1 forks source link

Count action hook and filter invocation for trace summary report #53

Closed bobbingwide closed 4 years ago

bobbingwide commented 7 years ago

The daily trace summary report may benefit from a simple figure that shows how many action hooks and filters were invoked in the transaction.

bobbingwide commented 7 years ago

Having developed this logic I wanted to test the affect on performance of including this count when oik-bwtrace is not otherwise active. Since I also wanted to attempt to measure the affect of the new hook logic on performance I developed the count-hooks.php routine in wp-top12. See https://github.com/bobbingwide/wp-top12/issues/4

bobbingwide commented 4 years ago

We have to consider the value of this information with respect to the time taken to measure it. Table assumes that the Daily Trace Summary report is being produced

Tracing Count hooks what’s there to show?
n n Nothing - not needed - output null
N y Nothing - we’d need to use our own counting hook
Y n Nothing - not needed - output null
Y y field should be set! We’ve been tracing anyway

In the second case, we’d need to develop a separate counting hook for the daily trace summary. It would be easy to measure the affect on performance by looking at the summary report. I think it’s worthwhile doing as an experiment.

bobbingwide commented 4 years ago

Having added a very simple hook, I think it would be nice to include the 'Hook count' figure in each trace record, after the cf=current filter string. If hook counting isn't selected then no value would be shown.

bobbingwide commented 4 years ago

That last commit should have been for #73.