Skip to content

Commit 93028ee

Browse files
committed
Framework changes necessary for all listed frameworks to run and output data
1 parent f069974 commit 93028ee

File tree

52 files changed

+97
-59
lines changed

Some content is hidden

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

52 files changed

+97
-59
lines changed

aura-2.0/web/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
);
1717
$kernel();
1818

19-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
19+
echo require dirname(__FILE__).'/../../libs/output_data.php';

bear-0.10/bootstrap/contexts/prod.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
//
6666
OK: {
6767
$app->response->setResource($app->page)->render()->send();
68-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
68+
echo require dirname(__FILE__).'/../../libs/output_data.php';
6969
exit(0);
7070
}
7171

bear-1.0/bootstrap/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
// representation transfer
3333
$page()->transfer($app->responder, $_SERVER);
34-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
34+
echo require dirname(__FILE__).'/../../libs/output_data.php';
3535
exit(0);
3636
} catch (\Exception $e) {
3737
$app->error->handle($e, $request)->transfer();

bear-1.0/var/log/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

bear-1.0/var/www/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Adhoc fix for benchmarking
44
// Remove sub directories from URI
55
$_SERVER['REQUEST_URI'] = preg_replace(
6-
'!/php-framework-benchmark/bear-1.0/var/www/index.php!',
6+
['!/php-framework-benchmark/bear-1.0/var/www/index.php!', '!/bear-1.0/var/www/index.php!'],
77
'',
88
$_SERVER['REQUEST_URI']
99
);

benchmarks/_functions.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,23 @@ benchmark ()
1919
grep "Document Length:" "$ab_log" >> "$check_file"
2020
grep "Failed requests:" "$ab_log" >> "$check_file"
2121
grep 'Hello World!' "$output" >> "$check_file"
22+
grep ':' "$output" >> "$check_file"
2223
echo "---" >> "$check_file"
2324

2425
# check errors
2526
touch "$error_file"
2627
error=''
27-
x=`grep 'Failed requests: 0' "$ab_log"`
28+
x=`grep 'Failed requests: 0' "$ab_log" || true`
2829
if [ "$x" = "" ]; then
2930
tmp=`grep "Failed requests:" "$ab_log"`
3031
error="$error$tmp"
3132
fi
32-
x=`grep 'Hello World!' "$output"`
33+
x=`grep 'Hello World!' "$output" || true`
34+
if [ "$x" = "" ]; then
35+
tmp=`cat "$output"`
36+
error="$error$tmp"
37+
fi
38+
x=`grep ':' "$output" || true`
3339
if [ "$x" = "" ]; then
3440
tmp=`cat "$output"`
3541
error="$error$tmp"

cake-3.0/webroot/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
new Response()
3737
);
3838

39-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
39+
echo require dirname(__FILE__).'/../../libs/output_data.php';

cake-3.1/src/Controller/HelloController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class HelloController extends AppController
88

99
public function index()
1010
{
11-
$this->response->body('Hello World!');
11+
$this->response->body('Hello World!' . require dirname(__FILE__).'/../../../libs/output_data.php');
1212
return $this->response;
1313
}
1414
}

cake-3.1/webroot/index.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@
3535
Request::createFromGlobals(),
3636
new Response()
3737
);
38-
39-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';

ci-3.0/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,4 +291,4 @@
291291
*/
292292
require_once BASEPATH.'core/CodeIgniter.php';
293293

294-
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
294+
echo require dirname(__FILE__).'/../libs/output_data.php';

0 commit comments

Comments
 (0)