Made the DB profiler use startAtomic()
Change-Id: I6eadd071c16781b320d0c8c518e6184a4c38d874
This commit is contained in:
parent
a01e85de7d
commit
cbb1c5fcef
1 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ class ProfilerSimpleDB extends ProfilerStandard {
|
|||
$dbw = wfGetDB( DB_MASTER );
|
||||
$useTrx = ( $dbw->getType() === 'sqlite' ); // much faster
|
||||
if ( $useTrx ) {
|
||||
$dbw->begin();
|
||||
$dbw->startAtomic( __METHOD__ );
|
||||
}
|
||||
foreach ( $this->mCollated as $name => $data ) {
|
||||
$eventCount = $data['count'];
|
||||
|
|
@ -103,7 +103,7 @@ class ProfilerSimpleDB extends ProfilerStandard {
|
|||
// "pf_time=pf_time + VALUES(pf_time)";
|
||||
}
|
||||
if ( $useTrx ) {
|
||||
$dbw->commit();
|
||||
$dbw->endAtomic( __METHOD__ );
|
||||
}
|
||||
} catch ( DBError $e ) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue