Let the doUpdates() func get counted even when it has nothing to do; otherwise stats will be skewed to only times when there are multiple updates. Or.... hmmm. bleah.
* @param $updates array of objects that hold an update to do
*/
function doUpdates( &$updates ) {
+ wfProfileIn( __METHOD__ );
/* No need to get master connections in case of empty updates array */
- if( !$updates ) {
+ if (!$updates) {
+ wfProfileOut( __METHOD__ );
return;
}
- wfProfileIn( __METHOD__ );
+
$dbw = wfGetDB( DB_MASTER );
foreach( $updates as $up ) {
$up->doUpdate();