Merge "Give TestCase::checkHasDiff3 a better name"
[lhc/web/wiklou.git] / maintenance / benchmarks / bench_delete_truncate.php
index ed3fe5c..9acb93a 100644 (file)
@@ -31,11 +31,11 @@ require_once __DIR__ . '/Benchmarker.php';
 class BenchmarkDeleteTruncate extends Benchmarker {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Benchmarks SQL DELETE vs SQL TRUNCATE.";
+               $this->addDescription( 'Benchmarks SQL DELETE vs SQL TRUNCATE.' );
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $test = $dbw->tableName( 'test' );
                $dbw->query( "CREATE TABLE IF NOT EXISTS /*_*/$test (
@@ -75,7 +75,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        private function insertData( $dbw ) {
                $range = range( 0, 1024 );
                $data = array();
-               foreach( $range as $r ) {
+               foreach ( $range as $r ) {
                        $data[] = array( 'text' => $r );
                }
                $dbw->insert( 'test', $data, __METHOD__ );