Browse files

benchmarks/

  • Loading branch information...
1 parent bca2b11 commit 76a862f33f4fdd0cbadef59ec493d55232254fdd @c9s c9s committed Feb 12, 2012
Showing with 19 additions and 0 deletions.
  1. +18 −0 benchmarks/create.php
  2. +1 −0 tests/bootstrap.php
View
18 benchmarks/create.php
@@ -0,0 +1,18 @@
+<?php
+require( 'tests/bootstrap.php');
+require 'tests/schema/tests/Author.php';
+
+$bench = new SimpleBench;
+$bench->setN( 500000 );
+$bench->setTitle('obj create');
+
+$bench->iterate( 'obj create' , 'object construction time' , function() {
+ $s = new stdClass;
+});
+
+$bench->iterate( 'model create', 'model create', function() {
+ $a = new tests\Author;
+});
+
+$result = $bench->compare();
+echo $result->output('console');
View
1 tests/bootstrap.php
@@ -9,4 +9,5 @@
dirname(__DIR__) . '/tests/schema',
'tests/src'
));
+$loader->useIncludePath(true);
$loader->register();

0 comments on commit 76a862f

Please sign in to comment.