@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime; |
4 | 4 | |
5 | -require_once __DIR__ . '/_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\EntityArrayOf; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $entities[] = new EntityNotTypedArray([ |
71 | 71 | 'floats' => $this->randArray('double', self::SCALAR_COUNT), |
72 | 72 | 'booleans' => $this->randArray('boolean', self::SCALAR_COUNT), |
73 | - 'dates' => array_map(function (\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)), |
|
73 | + 'dates' => array_map(function(\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)), |
|
74 | 74 | ]); |
75 | 75 | } |
76 | 76 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | foreach ($this->notTypedRepository->all() as $entity) { |
106 | 106 | $entity->booleans = array_map('boolval', $entity->booleans); |
107 | 107 | $entity->floats = array_map('doubleval', $entity->floats); |
108 | - $entity->dates = array_map(function ($str) { return \DateTime::createFromFormat(\DateTime::ISO8601, $str); }, $entity->dates); |
|
108 | + $entity->dates = array_map(function($str) { return \DateTime::createFromFormat(\DateTime::ISO8601, $str); }, $entity->dates); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | new EntityNotTypedArray([ |
133 | 133 | 'floats' => $this->randArray('double', self::SCALAR_COUNT), |
134 | 134 | 'booleans' => $this->randArray('boolean', self::SCALAR_COUNT), |
135 | - 'dates' => array_map(function (\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)), |
|
135 | + 'dates' => array_map(function(\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)), |
|
136 | 136 | ]) |
137 | 137 | ); |
138 | 138 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime\Query; |
4 | 4 | |
5 | -require_once __DIR__ . '/../_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/../_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\User; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime\Query; |
4 | 4 | |
5 | -require_once __DIR__ . '/../_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/../_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\User as BenchUser; |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime\Query; |
4 | 4 | |
5 | -require_once __DIR__ . '/../_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/../_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\User; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function bench_insert_transaction() |
210 | 210 | { |
211 | - $this->repository->transaction(function () { |
|
211 | + $this->repository->transaction(function() { |
|
212 | 212 | /** @var BulkInsertQuery $insert */ |
213 | 213 | $insert = $this->repository->queries()->make(BulkInsertQuery::class); |
214 | 214 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | public function bench_insert_builder() |
234 | 234 | { |
235 | - $this->repository->transaction(function () { |
|
235 | + $this->repository->transaction(function() { |
|
236 | 236 | for ($i = 0; $i < 100; ++$i) { |
237 | 237 | $this->repository->builder()->insert([ |
238 | 238 | 'id' => 6000000 + $i, |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime; |
4 | 4 | |
5 | -require_once __DIR__ . '/_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\User as BenchUser; |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | function convert($size) { |
118 | - return number_format($size/1024).' kb'; |
|
118 | + return number_format($size / 1024).' kb'; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | function profile($callback, $times) { |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | |
136 | 136 | $delta = ($end - $start); |
137 | 137 | |
138 | - $bench['time'] = $delta; |
|
139 | - $bench['queries'] = $times / $delta; |
|
140 | - $bench['memory'] = memory_get_usage(true) - $memory; |
|
138 | + $bench['time'] = $delta; |
|
139 | + $bench['queries'] = $times / $delta; |
|
140 | + $bench['memory'] = memory_get_usage(true) - $memory; |
|
141 | 141 | |
142 | 142 | return $bench; |
143 | 143 | } |
144 | 144 | \ No newline at end of file |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime\Query; |
4 | 4 | |
5 | -require_once __DIR__ . '/../_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/../_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\User; |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Bdf\Prime\Query; |
4 | 4 | |
5 | -require_once __DIR__ . '/../_files/BenchData.php'; |
|
5 | +require_once __DIR__.'/../_files/BenchData.php'; |
|
6 | 6 | |
7 | 7 | use Bdf\Prime\Bench\BenchData; |
8 | 8 | use Bdf\Prime\Bench\User; |