|
@@ -29,6 +29,10 @@ class BenchController extends Controller
|
|
|
$worlds[] = $repo->find(mt_rand(1, 10000));
|
|
|
}
|
|
|
|
|
|
+ if ($queries == 1) {
|
|
|
+ $worlds = $worlds[0];
|
|
|
+ }
|
|
|
+
|
|
|
return new JsonResponse($worlds);
|
|
|
}
|
|
|
|
|
@@ -43,6 +47,10 @@ class BenchController extends Controller
|
|
|
for($i = 0; $i < $queries; ++$i) {
|
|
|
$worlds[] = $conn->fetchAssoc('SELECT * FROM World WHERE id = ?', array(mt_rand(1, 10000)));
|
|
|
}
|
|
|
+
|
|
|
+ if ($queries == 1) {
|
|
|
+ $worlds = $worlds[0];
|
|
|
+ }
|
|
|
|
|
|
return new JsonResponse($worlds);
|
|
|
}
|