-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ fatfree-3.8 | |
fuelphp-1.9 | ||
kumbia-1.2 | ||
laravel-10.2 | ||
laravel-11.0 | ||
leaf-3.5 | ||
lumen-10.0 | ||
phroute-2.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
rm -rf !("_benchmark") | ||
find -path './.*' -delete | ||
rm -rf _benchmark/temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
# clear cache | ||
php artisan cache:clear | ||
php artisan optimize | ||
echo -e "done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
url="$base/$fw/public/index.php/hello/index" |
14 changes: 14 additions & 0 deletions
14
laravel-11.0/_benchmark/laravel/app/Http/Controllers/HelloWorldController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/* | ||
PHP-Frameworks-Bench | ||
this is a simple hello world controller to make benchmark | ||
*/ | ||
namespace App\Http\Controllers; | ||
|
||
class HelloWorldController extends Controller { | ||
public function index(): void { | ||
echo 'Hello World!'; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
use Illuminate\Contracts\Http\Kernel; | ||
use Illuminate\Http\Request; | ||
|
||
define('LARAVEL_START', microtime(true)); | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Check If The Application Is Under Maintenance | ||
|-------------------------------------------------------------------------- | ||
| | ||
| If the application is in maintenance / demo mode via the "down" command | ||
| we will load this file so that any pre-rendered content can be shown | ||
| instead of starting the framework, which could cause an exception. | ||
| | ||
*/ | ||
|
||
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { | ||
require $maintenance; | ||
} | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Register The Auto Loader | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Composer provides a convenient, automatically generated class loader for | ||
| this application. We just need to utilize it! We'll simply require it | ||
| into the script here so we don't need to manually load our classes. | ||
| | ||
*/ | ||
|
||
require __DIR__.'/../vendor/autoload.php'; | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Run The Application | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Once we have the application, we can handle the incoming request using | ||
| the application's HTTP kernel. Then, we will send the response back | ||
| to this client's browser, allowing them to enjoy our application. | ||
| | ||
*/ | ||
|
||
$app = require_once __DIR__.'/../bootstrap/app.php'; | ||
|
||
$kernel = $app->make(Kernel::class); | ||
|
||
$response = $kernel->handle( | ||
$request = Request::capture() | ||
)->send(); | ||
|
||
$kernel->terminate($request, $response); | ||
|
||
|
||
/* *** PHP-Frameworks-Bench *** */ | ||
require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Route; | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Web Routes | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here is where you can register web routes for your application. These | ||
| routes are loaded by the RouteServiceProvider within a group which | ||
| contains the "web" middleware group. Now create something great! | ||
| | ||
*/ | ||
|
||
Route::get('/', function () { | ||
return view('welcome'); | ||
}); | ||
|
||
|
||
/* *** PHP-Frameworks-Bench *** */ | ||
Route::get('/hello/index', [App\Http\Controllers\HelloWorldController::class, 'index']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
# create project | ||
rm -rf _benchmark/temp | ||
composer create-project --prefer-dist laravel/laravel:11.0.* ./_benchmark/temp --ansi | ||
mv ./_benchmark/temp/{.,}* ./ | ||
|
||
# have the route & controller | ||
yes|cp -rf _benchmark/laravel/. ./ | ||
|
||
# some enhancements | ||
composer install --optimize-autoloader --no-dev --ansi | ||
chmod -R o+w storage | ||
|
||
rm ./public/.htaccess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
composer update | ||
|
||
# have the route & controller | ||
yes|cp -rf _benchmark/laravel/. ./ | ||
|
||
# some enhancements | ||
composer install --optimize-autoloader --no-dev | ||
chmod -R o+w storage | ||
|
||
rm ./public/.htaccess |