View Full Version : Benchmark plugins?
Kaitlyn2004
07-19-2011, 08:06 PM
Is there any way to benchmark plugins... just log the time they take to execute or something?
I am guessing NOT (easily?), since it looks like:
($hook = vBulletinHook::fetch_hook('showthread_start')) ? eval($hook) : false;
There is no easy way to arbitrarily inject some code before and after (microtime calls) hook execution... right?
Seems like maybe you could change fetch_hook to add timing code around the code for each hook. But it looks like it has the code for all plugins on that hook in one chunk, so if you wanted to benchmark just one plugin you'd have to disable others at the same hook, or else put in the profiling code in vBulletinHook::build_data_store().
Kaitlyn2004
07-19-2011, 08:17 PM
Seems like maybe you could change fetch_hook to add timing code around the code for each hook. But it looks like it has the code for all plugins on that hook in one chunk, so if you wanted to benchmark just one plugin you'd have to disable others at the same hook, or else put in the profiling code in vBulletinHook::build_data_store().
Ahh... just came across that solution via google search (which brought me back here, haha..)
Looks like that could work. At least I could find out what is taking long(er) and narrow it down from there.. merci :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.