Count API module instantiations and Hook runs
authorOri Livneh <ori@wikimedia.org>
Thu, 2 Jul 2015 00:25:24 +0000 (17:25 -0700)
committerOri Livneh <ori@wikimedia.org>
Thu, 2 Jul 2015 23:45:02 +0000 (16:45 -0700)
commitbf27bbb181f119a6c6278d618d5f21518eff45c7
treeb4be1148b74720c4c1f4d99f601887deb2489537
parentbe250544ea8f8c9c9c42b117b85302602e835b27
Count API module instantiations and Hook runs

We previously had counts for hooks and modules as a side-effect of having them
profiled. We removed the profiling for performance reasons, which left us
without counts also. But the performance of counters is not a concern, and
their signal value not insubstantial. So introduce them here.

Fix getModulePath() to not crash while we're at it.

Change-Id: Ic04daf475b936b942833362c7a979dde671b3ef4
includes/Hooks.php
includes/api/ApiMain.php