dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move up devunt's name to Developers
[lhc/web/wiklou.git]
/
maintenance
/
Maintenance.php
diff --git
a/maintenance/Maintenance.php
b/maintenance/Maintenance.php
index
f97f6dc
..
c97c6a3
100644
(file)
--- a/
maintenance/Maintenance.php
+++ b/
maintenance/Maintenance.php
@@
-603,13
+603,19
@@
abstract class Maintenance {
* Activate the profiler (assuming $wgProfiler is set)
*/
protected function activateProfiler() {
* Activate the profiler (assuming $wgProfiler is set)
*/
protected function activateProfiler() {
- global $wgProfiler;
+ global $wgProfiler
, $wgProfileLimit, $wgTrxProfilerLimits
;
$output = $this->getOption( 'profiler' );
$output = $this->getOption( 'profiler' );
- if ( $output && is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
+ if ( !$output ) {
+ return;
+ }
+
+ if ( is_array( $wgProfiler ) && isset( $wgProfiler['class'] ) ) {
$class = $wgProfiler['class'];
$profiler = new $class(
$class = $wgProfiler['class'];
$profiler = new $class(
- array( 'sampling' => 1, 'output' => $output ) + $wgProfiler
+ array( 'sampling' => 1, 'output' => array( $output ) )
+ + $wgProfiler
+ + array( 'threshold' => $wgProfileLimit )
);
$profiler->setTemplated( true );
Profiler::replaceStubInstance( $profiler );
);
$profiler->setTemplated( true );
Profiler::replaceStubInstance( $profiler );
@@
-617,8
+623,7
@@
abstract class Maintenance {
$trxProfiler = Profiler::instance()->getTransactionProfiler();
$trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) );
$trxProfiler = Profiler::instance()->getTransactionProfiler();
$trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) );
- # Catch huge single updates that lead to slave lag
- $trxProfiler->setExpectation( 'maxAffected', 1000, __METHOD__ );
+ $trxProfiler->setExpectations( $wgTrxProfilerLimits['Maintenance'], __METHOD__ );
}
/**
}
/**