Skip to content
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
88ce5eb
Added initial docker stacks to be able to share benchmarking environm…
motin Dec 9, 2015
f069974
Storing results separately for each stack
motin Dec 9, 2015
93028ee
Framework changes necessary for all listed frameworks to run and outp…
motin Dec 9, 2015
a988715
Ability to check results stack by stack
motin Dec 9, 2015
8d10688
Include error log on results page
motin Dec 9, 2015
72fece1
Do not bail if error log happens to be empty after a run
motin Dec 9, 2015
be9c180
Results for the frameworks that actually run in the various stacks
motin Dec 9, 2015
df036ff
Re-enabled "no-framework" so that relative results can be compared ac…
motin Dec 9, 2015
79c2e76
Synced $output_dir usage
motin Dec 9, 2015
10178e5
Graphs across stacks are now comparable
motin Dec 9, 2015
0b93772
Removed comment proven to be wrong + non-altering code
motin Dec 10, 2015
8316f27
Reversed output_data require-refactoring
motin Dec 10, 2015
51c2493
Requiring libs/output_data based on env var
motin Dec 10, 2015
9907bbf
A single framework list to maintain
motin Dec 10, 2015
eb5ecbf
Using headers to output benchmark data (solved Content-Length curl is…
motin Dec 10, 2015
4a64560
Only calculate output data if specifically requested (fixes https://g…
motin Dec 10, 2015
b3b63ff
Restored list as it was before this pr
motin Dec 10, 2015
57dcaa7
Only exit on failure during development
motin Dec 10, 2015
4c5bb54
Restored parse results
motin Dec 10, 2015
7afc5c0
Preventing division by zero when calculating relative results
motin Dec 10, 2015
c74eeb8
Not using getallheaders() since it is not available in PHP 7 when usi…
motin Dec 10, 2015
8083565
Updated results
motin Dec 10, 2015
599856d
HTML-escaping error log on results page
motin Dec 10, 2015
5517da4
Docker-related parts of readme to separate file
motin Dec 10, 2015
5611c2b
Added placeholder for other results
motin Dec 10, 2015
8f75cbc
Activated opcode cache
motin Dec 10, 2015
54f5768
Including all frameworks despite stack (so that the resulting graphs …
motin Dec 10, 2015
9720d47
Updated results, including also in readme
motin Dec 10, 2015
d8abdcf
Added script to run all benchmarks against all docker stacks
motin Dec 10, 2015
c342017
Added note about source files for the used docker images
motin Dec 10, 2015
0ddaf5a
Adjusted working directories for docker stack services
motin Dec 10, 2015
19d8bd7
Docker stacks use /php-framework-benchmark/ sub-directory as well
motin Dec 10, 2015
b4d0e02
Reversed changes that were made to support requests without the php-f…
motin Dec 10, 2015
0f210a6
Added docker results export script
motin Dec 10, 2015
c41f14c
Zero out incomplete results and only allow valid results for enabled …
motin Dec 10, 2015
22a0569
Updated docker stack results
motin Dec 10, 2015
84842c3
Moved parameters for cross-stack graph consistency to query string
motin Dec 10, 2015
e720dd1
Including graphs to current results (including "no-framework")
motin Dec 10, 2015
e171242
Moved docker-related shell scripts to docker/bin/
motin Dec 11, 2015
4e137a5
Reversed usage of php_framework_benchmark_path
motin Dec 11, 2015
9861949
Added docker-compose build command to readme to ensure that all depen…
motin Dec 11, 2015
d9af4ae
Removed docker stack info from main readme
motin Dec 11, 2015
1ebe534
Updated show_fw_array.sh to use list.php directly
motin Dec 11, 2015
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
Prev Previous commit
Next Next commit
Zero out incomplete results and only allow valid results for enabled …
…frameworks to affect the relative results
  • Loading branch information
motin committed Dec 10, 2015
commit c41f14cbe636a57feac40dfd1c65473f79c8a925
37 changes: 29 additions & 8 deletions libs/parse_results.php
Original file line number Diff line number Diff line change
@@ -12,28 +12,49 @@ function parse_results($file)
$min_time = INF;
$min_file = INF;

$frameworks = frameworks();

foreach ($lines as $line) {
$column = explode(':', $line);
$fw = $column[0];
$rps = (float) trim($column[1]);
$memory = (float) trim($column[2])/1024/1024;
$time = (float) trim($column[3])*1000;
$file = (int) trim($column[4]);

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


// Zero out incomplete results
if (empty($memory) || empty($time) || empty($file)) {

$results[$fw] = [
'rps' => 0,
'memory' => 0,
'time' => 0,
'file' => 0,
];

// Prevent from affecting the relative results
continue;

}

// Only allow enabled frameworks to affect the relative results
if (array_search($fw, $frameworks)) {

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

}

$results[$fw] = [
'rps' => $rps,
'memory' => round($memory, 2),
'time' => $time,
'file' => $file,
];
}

$frameworks = frameworks();
}

$ordered_results = [];
foreach ($frameworks as $fw) {