Skip to content

Commit 79c2e76

Browse files
committed
Synced $output_dir usage
1 parent df036ff commit 79c2e76

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

bin/show_comparison_table.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
require __DIR__ . '/../libs/build_table.php';
55
require __DIR__ . '/../libs/recalc_relative.php';
66

7+
$stack = getenv('stack') ? getenv('stack') : 'local';
8+
$output_dir = __DIR__ . '/../output/' . $stack;
9+
710
$list = [
811
'cake-3.0',
912
'symfony-2.6',
1013
'zf-2.4',
1114
];
1215

1316
system('git checkout master');
14-
$results_master = parse_results(__DIR__ . '/../output/results.hello_world.log');
17+
$results_master = parse_results($output_dir . '/results.hello_world.log');
1518
system('git checkout optimize');
16-
$results_optimize = parse_results(__DIR__ . '/../output/results.hello_world.log');
19+
$results_optimize = parse_results($output_dir . '/results.hello_world.log');
1720
//var_dump($results_master, $results_optimize);
1821

1922
$is_fisrt = true;

bin/show_results_table.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
require __DIR__ . '/../libs/parse_results.php';
44
require __DIR__ . '/../libs/build_table.php';
55

6-
$results = parse_results(__DIR__ . '/../output/' . getenv('stack') . '/results.hello_world.log');
6+
$stack = getenv('stack') ? getenv('stack') : 'local';
7+
$output_dir = __DIR__ . '/../output/' . $stack;
8+
9+
$results = parse_results($output_dir . '/results.hello_world.log');
710
//var_dump($results);
811

912
echo build_table($results);

docker/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ php_5_6_4:
1919
ports:
2020
- "9000"
2121
environment:
22-
STACK: 'docker_nginx_php_5_6_4'
22+
stack: 'docker_nginx_php_5_6_4'
2323
working_dir: '/repo'
2424
command: "/stack/php/run-php-fpm.sh"
2525

@@ -32,7 +32,7 @@ hhvm_3_10_1:
3232
ports:
3333
- "9000"
3434
environment:
35-
STACK: 'docker_nginx_hhvm_3_10_1'
35+
stack: 'docker_nginx_hhvm_3_10_1'
3636
working_dir: '/repo'
3737
command: "/stack/php/run-hhvm.sh"
3838

@@ -45,7 +45,7 @@ php_7_0_0:
4545
ports:
4646
- "9000"
4747
environment:
48-
STACK: 'docker_nginx_php_7_0_0'
48+
stack: 'docker_nginx_php_7_0_0'
4949
working_dir: '/repo'
5050
command: "/stack/php/run-php-fpm-7.sh"
5151

index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

3-
$stack = getenv('STACK') ? getenv('STACK') : 'local';
3+
$stack = getenv('stack') ? getenv('stack') : 'local';
4+
$output_dir = __DIR__ . '/output/' . $stack;
45
$host = null;
56
switch ($stack) {
67
case 'local':
@@ -10,7 +11,6 @@
1011
$host = str_replace('docker_', '', $stack);
1112
break;
1213
};
13-
$output_dir = __DIR__ . '/output/' . $stack;
1414

1515
Parse_Results: {
1616
require __DIR__ . '/libs/parse_results.php';

0 commit comments

Comments
 (0)