Commit 01f5436b authored by zYne's avatar zYne

--no commit message

--no commit message
parent 3b4de020
...@@ -24,6 +24,8 @@ while ($i--) { ...@@ -24,6 +24,8 @@ while ($i--) {
$coll->save(); $coll->save();
$conn->clear(); $conn->clear();
print "<pre>DQL BENCHMARK \n";
$timepoint = microtime(true); $timepoint = microtime(true);
$i = 100; $i = 100;
...@@ -34,7 +36,7 @@ while ($i--) { ...@@ -34,7 +36,7 @@ while ($i--) {
$query->from('Entity e')->where('e.id > 0'); $query->from('Entity e')->where('e.id > 0');
$coll = $query->execute(array(), Doctrine::FETCH_ARRAY); $coll = $query->execute(array(), Doctrine::FETCH_ARRAY);
} }
print 'EXECUTED 100 QUERIES WITH CACHING ENABLED + FETCH_ARRAY : ' . (microtime(true) - $timepoint) . "<br \>"; print 'EXECUTED 100 QUERIES WITH CACHING ENABLED + FETCH_ARRAY : ' . (microtime(true) - $timepoint) . "\n";
$timepoint = microtime(true); $timepoint = microtime(true);
...@@ -45,7 +47,7 @@ while ($i--) { ...@@ -45,7 +47,7 @@ while ($i--) {
$query->from('Entity e')->where('e.id > 0'); $query->from('Entity e')->where('e.id > 0');
$coll = $query->execute(array(), Doctrine::FETCH_ARRAY); $coll = $query->execute(array(), Doctrine::FETCH_ARRAY);
} }
print 'EXECUTED 100 QUERIES WITHOUT CACHING + FETCH_ARRAY : ' . (microtime(true) - $timepoint); print 'EXECUTED 100 QUERIES WITHOUT CACHING + FETCH_ARRAY : ' . (microtime(true) - $timepoint) . "\n";
$timepoint = microtime(true); $timepoint = microtime(true);
...@@ -57,7 +59,7 @@ while ($i--) { ...@@ -57,7 +59,7 @@ while ($i--) {
$query->from('Entity e')->where('e.id > 0'); $query->from('Entity e')->where('e.id > 0');
$coll = $query->execute(); $coll = $query->execute();
} }
print 'EXECUTED 100 QUERIES WITH CACHING ENABLED + FETCH_RECORD : ' . (microtime(true) - $timepoint) . "<br \>"; print 'EXECUTED 100 QUERIES WITH CACHING ENABLED + FETCH_RECORD : ' . (microtime(true) - $timepoint) . "\n";
$timepoint = microtime(true); $timepoint = microtime(true);
...@@ -68,4 +70,4 @@ while ($i--) { ...@@ -68,4 +70,4 @@ while ($i--) {
$query->from('Entity e')->where('e.id > 0'); $query->from('Entity e')->where('e.id > 0');
$coll = $query->execute(); $coll = $query->execute();
} }
print 'EXECUTED 100 QUERIES WITHOUT CACHING + FETCH_RECORD : ' . (microtime(true) - $timepoint); print 'EXECUTED 100 QUERIES WITHOUT CACHING + FETCH_RECORD : ' . (microtime(true) - $timepoint) . "\n";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment