Skip to content

Commit

Permalink
Frameworks updated
Browse files Browse the repository at this point in the history
Frameworks updated, checkout `benchmark.config`
A bit changes
  • Loading branch information
myaaghubi committed May 17, 2023
1 parent 21b1786 commit 33e6e62
Show file tree
Hide file tree
Showing 84 changed files with 109 additions and 77 deletions.
20 changes: 10 additions & 10 deletions benchmark.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
base="http://127.0.0.1/PHP-Frameworks-Bench"

# 30-3000
# higher duration is better to get more reliable results
# a higher duration provides more reliable results
duration=60

# for a high-end host you may need to put
Expand All @@ -16,24 +16,24 @@ connections=500
# Frameworks list
# Sorted alphabetically
frameworks_list="
cakephp-4.3
codeigniter-4.1
cakephp-4.4
codeigniter-4.3
fastroute-1.3
fatfree-3.8.0
fatfree-3.8.1
frameworkx-dev
fuelphp-1.9
laminas-2.0.x.dev
laravel-9.1
leaf-3.0
lumen-9.0
laminas-2.0
laravel-10.0
leaf-3.3
lumen-10.0
phroute-2.2
pure-php
siler-1.7.9
silex-2.3
slim-3.12
slim-4.10
slim-4.11
symfony-5.4
symfony-6.0
symfony-6.2
ubiquity-2.4.x.dev
yii-2.0-basic
"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project --prefer-dist cakephp/app:4.3 ./_benchmark/temp
composer create-project --prefer-dist cakephp/app:^4.4 ./_benchmark/temp
yes|mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
41 changes: 0 additions & 41 deletions codeigniter-4.1/_benchmark/codeigniter/public/index.php

This file was deleted.

File renamed without changes.
File renamed without changes.
71 changes: 71 additions & 0 deletions codeigniter-4.3/_benchmark/codeigniter/public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

// Check PHP version.
$minPhpVersion = '7.4'; // If you update this, don't forget to update `spark`.
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
$minPhpVersion,
PHP_VERSION
);

exit($message);
}

// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);

// Ensure the current directory is pointing to the front controller's directory
chdir(FCPATH);

/*
*---------------------------------------------------------------
* BOOTSTRAP THE APPLICATION
*---------------------------------------------------------------
* This process sets up the path constants, loads and registers
* our autoloader, along with Composer's, loads our constants
* and fires up an environment-specific bootstrapping.
*/

// Load our paths config file
// This is the line that might need to be changed, depending on your folder structure.
require FCPATH . '../app/Config/Paths.php';
// ^^^ Change this line if you move your application folder

$paths = new Config\Paths();

// Location of the framework bootstrap file.
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';

// Load environment settings from .env files into $_SERVER and $_ENV
require_once SYSTEMPATH . 'Config/DotEnv.php';
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();

/*
* ---------------------------------------------------------------
* GRAB OUR CODEIGNITER INSTANCE
* ---------------------------------------------------------------
*
* The CodeIgniter class contains the core functionality to make
* the application run, and does all of the dirty work to get
* the pieces all working together.
*/

$app = Config\Services::codeigniter();
$app->initialize();
$context = is_cli() ? 'php-cli' : 'web';
$app->setContext($context);

/*
*---------------------------------------------------------------
* LAUNCH THE APPLICATION
*---------------------------------------------------------------
* Now that everything is setup, it's time to actually fire
* up the engines and make this app do its thang.
*/

$app->run();


/* *** PHP-Frameworks-Bench *** */
require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php';
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project codeigniter4/appstarter:4.1 --no-dev ./_benchmark/temp
composer create-project codeigniter4/appstarter:^4.3 --no-dev ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fastroute-1.3/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"nikic/fast-route": "1.3"
"nikic/fast-route": "^1.3"
},
"autoload": {
"psr-4": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"bcosca/fatfree-core": "3.8.0"
"bcosca/fatfree-core": "^3.8.1"
},
"autoload": {
"psr-4": {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fuelphp-1.9/_benchmark/setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project fuel/fuel:1.9.0 --prefer-dist ./_benchmark/temp
composer create-project fuel/fuel:^1.9.0 --prefer-dist ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
9 changes: 5 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@
echo "<h4>" . date("Y/m/d H:i:s", filemtime($resultsFile)) . "</h4>";
?>
<br>
<canvas id="rpsChart" height="120"></canvas>
<canvas id="rpsChart" height="125"></canvas>
<br>
<canvas id="memoryChart" height="120"></canvas>
<br>
<canvas id="timeChart" height="120"></canvas>
<canvas id="memoryChart" height="90"></canvas>
<br>
<canvas id="fileChart" height="120"></canvas>
<canvas id="timeChart" height="90"></canvas>
<br>
<canvas id="fileChart" height="90"></canvas>
<?php
}
?>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project laminas/laminas-mvc-skeleton:2.0.x-dev ./_benchmark/temp
composer create-project laminas/laminas-mvc-skeleton:^2.0 ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project --prefer-dist laravel/laravel:9.1 ./_benchmark/temp
composer create-project --prefer-dist laravel/laravel:^10.0 ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion leaf-3.0/composer.json → leaf-3.3/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"leafs/leaf": "3.0"
"leafs/leaf": "^3.3"
},
"autoload": {
"psr-4": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project --prefer-dist laravel/lumen:9.0 ./_benchmark/temp
composer create-project --prefer-dist laravel/lumen:^10.0 ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion phroute-2.2/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"phroute/phroute": "2.2"
"phroute/phroute": "^2.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion silex-2.3/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"silex/silex": "2.3"
"silex/silex": "^2.3"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion slim-3.12/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"slim/slim": "3.12.3"
"slim/slim": "^3.12"
},
"config": {
"optimize-autoloader": true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion slim-4.10/composer.json → slim-4.11/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"slim/slim": "4.10.0",
"slim/slim": "^4.11",
"slim/psr7": "^1.5",
"slim/http": "^1.2"
},
Expand Down
2 changes: 1 addition & 1 deletion slim-4.10/index.php → slim-4.11/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$app = AppFactory::create();

// xampp
$app->setBasePath("/PHP-Frameworks-Bench/slim-4.10/index.php");
$app->setBasePath("/PHP-Frameworks-Bench/slim-4.11/index.php");

// Add error middleware
$app->addErrorMiddleware(false, true, true);
Expand Down
2 changes: 1 addition & 1 deletion symfony-5.4/_benchmark/setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project symfony/skeleton:5.4.99 ./_benchmark/temp
composer create-project symfony/skeleton:^5.4 ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project symfony/skeleton:6.0.99 ./_benchmark/temp
composer create-project symfony/skeleton:^6.2 ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ubiquity-2.4.x.dev/_benchmark/ubiquity/app/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
],
"sessionName"=>"temp",
"namespaces"=>[],
"templateEngine"=>'Ubiquity\\views\\engine\\Twig',
"templateEngineOptions"=>array("cache"=>false),
//"templateEngine"=>'Ubiquity\\views\\engine\\Twig',
"templateEngineOptions"=>array("cache"=>true),
"test"=>false,
"debug"=>false,
"logger"=>function(){return new \Ubiquity\log\libraries\UMonolog("temp",\Monolog\Logger::INFO);},
Expand Down
9 changes: 5 additions & 4 deletions yii-2.0-basic/_benchmark/setup.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/sh
# create project
rm -rf _benchmark/temp
composer create-project --prefer-dist yiisoft/yii2-app-basic:"^2.0" ./_benchmark/temp
composer create-project --prefer-dist yiisoft/yii2-app-basic:^2.0 ./_benchmark/temp
mv ./_benchmark/temp/{.,}* ./

# have the route & controller
yes|cp -r _benchmark/yii2/* ./

# some enhancements
composer install --no-dev -o
rm ./public/.htaccess

# composer install --no-dev -o
# I used --ignore-platform-req=php because at the moment
# yii 2 basic not support php 8.2
composer --ignore-platform-req=php install --no-dev -o

0 comments on commit 33e6e62

Please sign in to comment.