X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fprofiler%2FProfilerSimpleDB.php;h=911b926a7af387c2a035b5d79210a4ded692e786;hb=4fa6c46c945b101ea69b855c8ea22a3e59655385;hp=38a6436f9d7ea5fb47e81a7938cd732786239918;hpb=69083eac4e92f0e2e7954c1480bf31bed0f4e787;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/profiler/ProfilerSimpleDB.php b/includes/profiler/ProfilerSimpleDB.php index 38a6436f9d..911b926a7a 100644 --- a/includes/profiler/ProfilerSimpleDB.php +++ b/includes/profiler/ProfilerSimpleDB.php @@ -27,14 +27,6 @@ * @ingroup Profiler */ class ProfilerSimpleDB extends ProfilerStandard { - protected function collateOnly() { - return true; - } - - public function isPersistent() { - return true; - } - /** * Log the whole profiling data into the database. */ @@ -58,9 +50,9 @@ 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 ) { + foreach ( $this->collated as $name => $data ) { $eventCount = $data['count']; $timeSum = (float)( $data['real'] * 1000 ); $memorySum = (float)$data['memory']; @@ -103,7 +95,7 @@ class ProfilerSimpleDB extends ProfilerStandard { // "pf_time=pf_time + VALUES(pf_time)"; } if ( $useTrx ) { - $dbw->commit(); + $dbw->endAtomic( __METHOD__ ); } } catch ( DBError $e ) { }