Skip to content

Commit

Permalink
Update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
emonkak committed Dec 15, 2015
1 parent e88d967 commit 78fd8cd
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 66 deletions.
33 changes: 33 additions & 0 deletions benchmarks/LeagueContainerEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Emonkak\Di\Benchmarks;

use Athletic\AthleticEvent;
use Emonkak\Di\Benchmarks\Fixtures\Foo;
use League\Container\Container;
use League\Container\ReflectionContainer;

class LeagueContainerEvent extends AthleticEvent
{
/**
* @iterations 1000
*/
public function get()
{
$container = new Container();
$container->delegate(new ReflectionContainer());

$container->add('Emonkak\Di\Benchmarks\Fixtures\FooInterface', 'Emonkak\Di\Benchmarks\Fixtures\Foo')
->withArgument('Emonkak\Di\Benchmarks\Fixtures\BarInterface')
->withArgument('Emonkak\Di\Benchmarks\Fixtures\BazInterface');
$container->add('Emonkak\Di\Benchmarks\Fixtures\BarInterface', 'Emonkak\Di\Benchmarks\Fixtures\Bar')
->withArgument('Emonkak\Di\Benchmarks\Fixtures\Qux')
->withArgument('Emonkak\Di\Benchmarks\Fixtures\Quux');
$container->add('Emonkak\Di\Benchmarks\Fixtures\BazInterface', 'Emonkak\Di\Benchmarks\Fixtures\Baz')
->withArgument('Emonkak\Di\Benchmarks\Fixtures\Corge')
->withArgument('Emonkak\Di\Benchmarks\Fixtures\Grault');

$foo = $container->get('Emonkak\Di\Benchmarks\Fixtures\FooInterface');
assert($foo instanceof Foo);
}
}
25 changes: 0 additions & 25 deletions benchmarks/LeagueDiEvent.php

This file was deleted.

38 changes: 0 additions & 38 deletions benchmarks/OrnoDiEvent.php

This file was deleted.

4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@
"doctrine/annotations": "~1.2",
"doctrine/cache": "~1.6@dev",
"facebook/xhprof": "dev-master",
"league/di": "^1.2",
"league/container": "^2.0",
"mnapoli/php-di": "~4.4",
"nikic/php-parser": "~1.2",
"orno/cache": "~1.0",
"orno/di": "~2.3",
"phpunit/phpunit": "~4.4",
"pimple/pimple": "~3.0",
"ray/di": "^2.2",
Expand Down

0 comments on commit 78fd8cd

Please sign in to comment.