Merge "jquery.accessKeyLabel: make modifier info public"
[lhc/web/wiklou.git] / maintenance / benchmarks / bench_delete_truncate.php
index 9f11c63..572c548 100644 (file)
@@ -29,14 +29,13 @@ require_once __DIR__ . '/Benchmarker.php';
  * @ingroup Benchmark
  */
 class BenchmarkDeleteTruncate extends Benchmarker {
-
        public function __construct() {
                parent::__construct();
                $this->mDescription = "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 (
@@ -70,20 +69,20 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return void
         */
        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__ );
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return void
         */
        private function delete( $dbw ) {
@@ -91,7 +90,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        /**
-        * @param $dbw DatabaseBase
+        * @param DatabaseBase $dbw
         * @return void
         */
        private function truncate( $dbw ) {