Kenji です。
以前に BEAR.Sunday の Hello World ベンチマークをとりました。
http://blog.a-way-out.net/blog/2014/06/10/php-framework-benchmark/
今回、同じコードを composer update したら、結果が大幅に悪化しました。
299.59 trans/sec (アップデート前)
↓
38.28 trans/sec (アップデート後)
あまりにも変化が大きいので、そもそも何か私の環境がおかしいのか?とも
思いましたが、別の環境でやっても大きく悪化しました。
BEAR.Package の 0.12.0 のリリースには
less performance but stable DI using ModuleCacheInjector
https://github.com/koriym/BEAR.Package/releases
とありますので、パフォーマンスの悪化はあるのでしょうが、これほど
悪くなるものなのでしょうか?あるいは、この結果は何かおかしいでしょうか?
ベンチマークのソースコードは以下にあります。
https://bitbucket.org/kenjis/benchmark-bear-sunday-0.10
■アップデート前
$ siege -b -c 10 -t 3S
http://localhost/bear/hello?name=BEAR
** SIEGE 3.0.5
** Preparing 10 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 734 hits
Availability: 100.00 %
Elapsed time: 2.45 secs
Data transferred: 0.01 MB
Response time: 0.03 secs
Transaction rate: 299.59 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 9.88
Successful transactions: 734
Failed transactions: 0
Longest transaction: 0.09
Shortest transaction: 0.00
■アップデート
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing twig/twig (v1.15.1)
- Installing twig/twig (v1.16.2)
Downloading: 100%
- Removing symfony/http-foundation (v2.5.0)
- Installing symfony/http-foundation (v2.5.7)
Loading from cache
- Removing pagerfanta/pagerfanta (v1.0.2)
- Installing pagerfanta/pagerfanta (v1.0.3)
Downloading: 100%
- Removing doctrine/cache (v1.3.0)
- Installing doctrine/cache (v1.3.1)
Downloading: 100%
- Removing doctrine/annotations (v1.1.2)
- Installing doctrine/annotations (v1.2.1)
Downloading: 100%
- Removing doctrine/dbal (v2.4.2)
- Installing doctrine/dbal (v2.4.3)
Downloading: 100%
- Installing aura/session (1.0.2)
Downloading: 100%
- Removing aura/sql (2.0.1)
- Installing aura/sql (2.1.0)
Downloading: 100%
- Updating aura/web (dev-develop-2 b4b8a94 => 2.0.1)
Checking out 2a29c536151ebed7f4317d4421567eb1f734455d
- Installing aura/router (2.2.0)
Downloading: 100%
- Installing aura/html (2.0.0)
Downloading: 100%
- Removing aura/input (1.1.1)
- Installing aura/input (1.1.2)
Downloading: 100%
- Removing nikic/php-parser (v0.9.4)
- Installing nikic/php-parser (v1.0.2)
Downloading: 100%
- Removing ray/aop (1.2.5)
- Installing ray/aop (1.3.1)
Downloading: 100%
- Removing ray/di (1.3.4)
- Installing ray/di (1.4.5)
Downloading: 100%
- Removing nocarrier/hal (0.9.6)
- Installing nocarrier/hal (0.9.10)
Downloading: 100%
- Removing guzzlehttp/streams (1.1.0)
- Installing guzzlehttp/streams (2.1.0)
Downloading: 100%
- Removing guzzlehttp/guzzle (4.1.0)
- Installing guzzlehttp/guzzle (4.2.3)
Downloading: 100%
- Removing guzzlehttp/command (0.4.0)
- Installing guzzlehttp/command (0.6.0)
Downloading: 100%
- Removing aura/signal (1.0.3)
- Installing aura/signal (1.0.4)
Downloading: 100%
- Removing bear/resource (0.13.1)
- Installing bear/resource (0.13.2)
Downloading: 100%
- Removing bear/package (0.11.2)
- Installing bear/package (0.13.0)
Downloading: 100%
- Removing filp/whoops (1.1.1)
- Installing filp/whoops (1.1.3)
Loading from cache
- Removing zendframework/zend-stdlib (2.3.1)
- Installing zendframework/zend-stdlib (2.3.3)
Downloading: 100%
- Removing zendframework/zend-db (2.3.1)
- Installing zendframework/zend-db (2.3.3)
Downloading: 100%
- Removing zendframework/zend-servicemanager (2.3.1)
- Installing zendframework/zend-servicemanager (2.3.3)
Downloading: 100%
- Removing zendframework/zend-log (2.3.1)
- Installing zendframework/zend-log (2.3.3)
Downloading: 100%
- Removing symfony/yaml (v2.5.0)
- Installing symfony/yaml (v2.5.7)
Downloading: 100%
- Removing symfony/console (v2.5.0)
- Installing symfony/console (v2.5.7)
Loading from cache
- Removing symfony/filesystem (v2.5.0)
- Installing symfony/filesystem (v2.5.7)
Loading from cache
- Removing symfony/config (v2.5.0)
- Installing symfony/config (v2.5.7)
Downloading: 100%
- Removing symfony/class-loader (v2.5.0)
- Installing symfony/class-loader (v2.5.7)
Downloading: 100%
- Removing robmorgan/phinx (v0.3.4)
- Installing robmorgan/phinx (v0.3.8)
Downloading: 100%
- Removing phpunit/php-token-stream (1.2.2)
- Installing phpunit/php-token-stream (1.3.0)
Downloading: 100%
- Installing doctrine/instantiator (1.0.4)
Downloading: 100%
- Installing sebastian/environment (1.2.0)
Downloading: 100%
- Installing sebastian/exporter (1.0.2)
Downloading: 100%
- Installing sebastian/diff (1.2.0)
Downloading: 100%
- Installing sebastian/version (1.0.3)
Downloading: 100%
- Installing sebastian/comparator (1.0.1)
Downloading: 100%
- Removing phpunit/php-code-coverage (1.2.17)
- Installing phpunit/php-code-coverage (2.0.11)
Downloading: 100%
- Removing phpunit/phpunit-mock-objects (1.2.3)
- Installing phpunit/phpunit-mock-objects (2.3.0)
Downloading: 100%
- Removing phpunit/phpunit (3.7.37)
- Installing phpunit/phpunit (4.2.6)
Downloading: 100%
- Removing dg/adminer-custom (v1.3.0)
- Installing dg/adminer-custom (v1.5.0)
Downloading: 100%
- Removing symfony/finder (v2.5.0)
- Installing symfony/finder (v2.5.7)
Loading from cache
- Removing classpreloader/classpreloader (1.0.2)
- Installing classpreloader/classpreloader (1.1.0)
Downloading: 100%
- Removing bear/dev-package (0.2.2)
- Installing bear/dev-package (0.2.3)
Downloading: 100%
- Updating facebook/xhprof dev-master (0a7a5f6 => 6bf0072)
Checking out 6bf00728827fc1e2a639dff6f94f1618396bffc5
Writing lock file
Generating autoload files
■アップデート後
$ siege -b -c 10 -t 3S
http://localhost/bear/hello?name=BEAR
** SIEGE 3.0.5
** Preparing 10 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 98 hits
Availability: 100.00 %
Elapsed time: 2.56 secs
Data transferred: 0.00 MB
Response time: 0.25 secs
Transaction rate: 38.28 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 9.45
Successful transactions: 98
Failed transactions: 0
Longest transaction: 0.31
Shortest transaction: 0.10
// Kenji