File tree Expand file tree Collapse file tree 9 files changed +76
-0
lines changed Expand file tree Collapse file tree 9 files changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ silex-2.3
3232slim-4.12
3333symfony-5.4
3434symfony-6.4
35+ symfony-7.0
3536ubiquity-2.4.x.dev
3637yii-2.0-basic
3738"
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ rm -rf ! (" _benchmark" )
3+ find -path ' ./.*' -delete
4+ rm -rf _benchmark/temp
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # clear cache
3+ bin/console cache:clear -q
4+ echo -e " done"
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ url=" $base /$fw /public/index.php/hello/index"
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # create project
3+ rm -rf _benchmark/temp
4+ composer create-project symfony/skeleton:7.0.* ./_benchmark/temp --ansi
5+ mv ./_benchmark/temp/{.,}* ./
6+
7+ # have the route & controller
8+ yes| cp -r _benchmark/symfony/* ./
9+
10+ # some enhancement
11+ composer dump-env prod --ansi
12+ APP_ENV=prod APP_DEBUG=0 bin/console cache:clear
13+ composer install --no-dev --optimize-autoloader --ansi
14+ chmod -R o+w var
Original file line number Diff line number Diff line change 1+ # index:
2+ # path: /
3+ # controller: App\Controller\DefaultController::index
4+ hello_world :
5+ path : /hello/index
6+ controller : App\Controller\HelloWorldController::index
Original file line number Diff line number Diff line change 1+ <?php
2+ /*
3+ PHP-Frameworks-Bench
4+ this is a simple hello world controller to make benchmark
5+ */
6+ use App \Kernel ;
7+
8+ use Symfony \Component \HttpFoundation \Request ;
9+
10+ require __DIR__ .'/../vendor/autoload.php ' ;
11+
12+
13+ $ kernel = new Kernel ('prod ' , false );
14+ $ request = Request::createFromGlobals ();
15+ $ response = $ kernel ->handle ($ request );
16+ $ response ->send ();
17+ $ kernel ->terminate ($ request , $ response );
18+
19+ require $ _SERVER ['DOCUMENT_ROOT ' ].'/PHP-Frameworks-Bench/libs/output_data.php ' ;
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+ /*
3+ PHP-Frameworks-Bench
4+ this is a simple hello world controller to make benchmark
5+ */
6+ namespace App \Controller ;
7+
8+ use Symfony \Component \HttpFoundation \Response ;
9+
10+ // such simple controller
11+ class HelloWorldController {
12+ public function index (): Response {
13+ return new Response ('Hello World! ' );
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ composer update
3+
4+ # have the route & controller
5+ yes| cp -r _benchmark/symfony/* ./
6+
7+ # some enhancements
8+ composer dump-env prod
9+ composer install --no-dev --optimize-autoloader
10+ APP_ENV=prod APP_DEBUG=0 bin/console cache:clear
11+ chmod -R o+w var
You can’t perform that action at this time.
0 commit comments