Skip to content

Commit 555abc2

Browse files
committed
Update v1.3
1. Some bug fixes. 2. Common errors solved. 3. clean.sh added. 4. update.sh & setup.sh & list.sh updated. 5. All frameworks updated. 6. Some enhancements & some minor changes.
1 parent b782a1e commit 555abc2

File tree

2,289 files changed

+654
-284205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,289 files changed

+654
-284205
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

benchmark.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ cd benchmarks
1616

1717
sh hello_world.sh "$base"
1818

19-
php ../bin/show_results_table.php
19+
php ../bin/show_results_table.php

benchmarks/_functions.sh

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@ benchmark () {
44
output_wrk="output/$fw.wrk.log"
55
output="output/$fw.output"
66

7-
# get rpm
8-
# for this version of wrk -R (--rate) is necessary to use
7+
# get rps
8+
# for this version of wrk -R (--rate) is necessary to use for wsl
99
# I used a large number to make sure there be no limitation of rate
1010
# for a high end server, you can increase first two parameters
11-
echo "wrk -t50 -c50 -d10s -R1000g $url"
12-
wrk -t50 -c50 -d10s -R1000g "$url" > "$output_wrk"
13-
14-
rps=""
15-
i=4
16-
# this loop is helpful to discover small numbers
17-
while [ $i -lt 7 ] && [ -z "$rps" ]
18-
do
19-
rps=`grep "Requests/sec:" "$output_wrk" | cut -f $i -d " "`
20-
i=$(( $i + 1 ))
21-
done
11+
# is it wsl!?
12+
if grep -q Microsoft /proc/version; then
13+
echo "wrk -t50 -c1000 -d10s -R1000g $url"
14+
wrk -t50 -c1000 -d10s -R1000g "$url" > "$output_wrk"
15+
else
16+
echo "wrk -t50 -c1000 -d10s $url"
17+
wrk -t50 -c1000 -d10s "$url" > "$output_wrk"
18+
fi
2219

20+
rps=`grep "Requests/sec:" "$output_wrk" | tr -dc '0-9.'`
2321

2422
count=5
2523

benchmarks/hello_world.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mv "$url_file" "$url_file.old"
2121
for fw in `echo $targets`
2222
do
2323
if [ -d "$fw" ]; then
24-
echo "$fw"
24+
echo "/------- $fw: benchmarking -------/"
2525
echo "$fw/_benchmark/hello_world.sh"
2626
. "$fw/_benchmark/hello_world.sh"
2727
benchmark "$fw" "$url"

cakephp-4.3/.editorconfig

Lines changed: 0 additions & 23 deletions
This file was deleted.

cakephp-4.3/.gitattributes

Lines changed: 0 additions & 34 deletions
This file was deleted.

cakephp-4.3/.gitignore

Lines changed: 0 additions & 43 deletions
This file was deleted.

cakephp-4.3/README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

cakephp-4.3/config/app_local.example.php renamed to cakephp-4.3/_benchmark/cakephp/config/app_local.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
* Development Mode:
1616
* true: Errors and warnings shown.
1717
*/
18-
'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
18+
/* *** php-frameworks-bench *** */
19+
'debug' => false,
1920

2021
/*
2122
* Security and encryption configuration
@@ -25,7 +26,7 @@
2526
* You should treat it as extremely sensitive data.
2627
*/
2728
'Security' => [
28-
'salt' => env('SECURITY_SALT', '__SALT__'),
29+
'salt' => env('SECURITY_SALT', 'c68845eb71fab6866f7ee1177b2a0055c3ebc1995a4cb1116563e47fa64c9695'),
2930
],
3031

3132
/*

cakephp-4.3/config/routes.php renamed to cakephp-4.3/_benchmark/cakephp/config/routes.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,21 @@
4444
*/
4545
$routes->setRouteClass(DashedRoute::class);
4646

47+
/* *** php-frameworks-bench *** */
48+
$routes->connect('/hello/index', ['controller' => 'HelloWorld', 'action' => 'display', 'home']);
49+
4750
$routes->scope('/', function (RouteBuilder $builder) {
4851
/*
4952
* Here, we are connecting '/' (base path) to a controller called 'Pages',
5053
* its action called 'display', and we pass a param to select the view file
5154
* to use (in this case, templates/Pages/home.php)...
5255
*/
53-
$builder->connect('/hello/index', ['controller' => 'helloworld', 'action' => 'display', 'home']);
56+
$builder->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
57+
58+
/*
59+
* ...and connect the rest of 'Pages' controller's URLs.
60+
*/
61+
$builder->connect('/pages/*', 'Pages::display');
5462

5563
/*
5664
* Connect catchall routes for all controllers.

0 commit comments

Comments
 (0)