Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions benchmark-no-apache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

#base="http://127.0.0.1/php-framework-benchmark"
base="http://localhost:8888/php-framework-benchmark"

cd `dirname $0`

php -S localhost:8888 -t .. > /dev/null 2>&1 &
PHP_PID=$!
sleep 2;

if [ $# -eq 0 ]; then
# include framework list
. ./list.sh
export targets="$list"
else
export targets="${@%/}"
fi

cd benchmarks

sh hello_world.sh "$base"

php ../bin/show_results_table.php
kill $PHP_PID
3 changes: 2 additions & 1 deletion benchmarks/_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ benchmark ()
# get time
count=10
total=0
for ((i=0; i < $count; i++)); do
#for ((i=0; i < $count; i++)); do
for i in $(seq 0 $count); do
curl "$url" > "$output"
t=`tail -1 "$output" | cut -f 2 -d ':'`
total=`php ./benchmarks/sum_ms.php $t $total`
Expand Down
8 changes: 4 additions & 4 deletions libs/parse_results.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ function parse_results($file)
$time = (float) trim($column[3])*1000;
$file = (int) trim($column[4]);

$min_rps = min($min_rps, $rps);
$min_memory = min($min_memory, $memory);
$min_time = min($min_time, $time);
$min_file = min($min_file, $file);
$min_rps = min($min_rps, $rps ?: INF);
$min_memory = min($min_memory, $memory ?: INF);
$min_time = min($min_time, $time ?: INF);
$min_file = min($min_file, $file ?: INF);

$results[$fw] = [
'rps' => $rps,
Expand Down
3 changes: 3 additions & 0 deletions list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ staticphp-0.9
#symfony-2.6
#symfony-2.7
symfony-3.0
symfony-3.4
symfony-3.4-micro
symfony-3.4-empty
tipsy-0.10
#typo3f-2.3 # does not work
#typo3f-3.0 # Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Object\ObjectManager::setObjects() must be of the type array, null given
Expand Down
4 changes: 4 additions & 0 deletions nofuss-1.2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/cache/
!/cache/.gitkeep
!/cache/smarty/.gitignore
!/cache/templates_c/.gitignore
Empty file added nofuss-1.2/cache/.gitkeep
Empty file.
Loading