Skip to content

Commit

Permalink
benchmarks/
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Feb 12, 2012
1 parent bca2b11 commit 76a862f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions 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');
1 change: 1 addition & 0 deletions tests/bootstrap.php
Expand Up @@ -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.