$maintClass = false;
+use MediaWiki\Logger\LoggerFactory;
+
/**
* Abstract maintenance class for quickly writing and churning out
* maintenance scripts with minimal effort. All that _must_ be defined
$profiler->setTemplated( true );
Profiler::replaceStubInstance( $profiler );
}
+
+ $trxProfiler = Profiler::instance()->getTransactionProfiler();
+ $trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) );
+ # Catch huge single updates that lead to slave lag
+ $trxProfiler->setExpectation( 'maxAffected', 1000, __METHOD__ );
}
/**
}
$options[$option] = $param;
}
+ } elseif ( $arg == '-' ) {
+ # Lonely "-", often used to indicate stdin or stdout.
+ $args[] = $arg;
} elseif ( substr( $arg, 0, 1 ) == '-' ) {
# Short options
$argLength = strlen( $arg );