Skip to content

Commit

Permalink
Merge branch 'master' of github.com:phoronix-test-suite/phoronix-test…
Browse files Browse the repository at this point in the history
…-suite
  • Loading branch information
michaellarabel committed Nov 5, 2018
2 parents b74049c + 38f0f3e commit 7955d58
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions pts-core/objects/pts_test_result_parser.php
Expand Up @@ -304,6 +304,41 @@ public static function generate_extra_data(&$test_result, &$test_log_file = null
}
}
}
break;
case 'valve-source-frame-times':
// Counter-Strike: GO At least
$log_file = pts_file_io::file_get_contents($test_log_file);
$frame_all_times = array();
if(($x = strpos($log_file, 'demo tick,frame start time,frame start delta')) !== false)
{
$log_file = substr($log_file, $x);
foreach(explode(PHP_EOL, $log_file) as $line)
{
$line = explode(',', $line);
if(isset($line[2]) && is_numeric($line[2]) && $line[2] > 0)
{
$frame_all_times[] = $line[2] * 1000;
}
}
}
break;
case 'csv-f1-frame-times':
// F1 2018
$log_file = pts_file_io::file_get_contents($test_log_file);
$frame_all_times = array();
if(($x = strpos($log_file, 'Frame,Time (ms)')) !== false)
{
$log_file = substr($log_file, $x);
foreach(explode(PHP_EOL, $log_file) as $line)
{
$line = explode(',', $line);
if(isset($line[1]) && is_numeric($line[1]) && $line[1] > 0)
{
$frame_all_times[] = $line[2];
}
}
}
break;
case 'csv-individual-frame-times':
// Thrones of Britannia on Linux uses at least this method
$log_file = pts_file_io::file_get_contents($test_log_file);
Expand Down

0 comments on commit 7955d58

Please sign in to comment.