Browse Source

verify Fixed micromvc's db test

Mike Smith 11 năm trước cách đây
mục cha
commit
c10eb14249
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      php-micromvc/Class/Controller/Benchmark/Db.php

+ 4 - 0
php-micromvc/Class/Controller/Benchmark/Db.php

@@ -15,6 +15,10 @@ class Db extends \MyController
         for ($i = 0; $i < $queries; ++$i) {
             $this->worlds[] = World::row(array('id' => mt_rand(1, 10000)))->to_array();
         }
+
+        if ($queries == 1) {
+            $this->worlds = $this->worlds[0];
+        }
     }
 
     public function send() {