SA Bugzilla – Bug 4517
Rule instrumentation plugins
Last modified: 2005-11-07 16:53:05 UTC
Allow plugins to instrument the rule testing process. This is primarily in order to get various types of timing information.
Created attachment 3054 [details] Proposed enhancement
Created attachment 3055 [details] Sample timing plugin
Do the additions have any effect on overall performance?
Since in the case where no loaded plugin uses the new callbacks the additions do nothing but rename ran_rule_debug_code() to hit_rule_debug_code() and add a few calls to the newly created have_callback() during rule compilation, I can't see how there could posibly be any effect on overall performance.
Correction, that's hit_rule_plugin_code(), not hit_rule_debug_code().
interesting! ok. I'd still like to see a benchmark mass-check with and without these hooks in place ;)
applied patch 3054. I took a good look and I see that it can't affect speed unless a timing plugin is loaded (due to the conditional compilation). I'm not sure what to do with the sample plugin -- wiki? Mail::SA::Plugin directory in svn? I think I'd lean towards the latter. John, still waiting for that ASF committer account. however I saw it move into the "really to do soon" queue today btw ;) Sending lib/Mail/SpamAssassin/PerMsgStatus.pm Sending lib/Mail/SpamAssassin/Plugin.pm Sending lib/Mail/SpamAssassin/PluginHandler.pm Sending lib/Mail/SpamAssassin.pm Transmitting file data .... Committed revision 294971.
Also instrumented eval rules. Committed revision 331591.
worth noting that this is being used at the new rule-QA system at http://buildbot.spamassassin.org/ruleqa/