summaryrefslogtreecommitdiffstats
path: root/pts/test-resources/sunflow/parse-results.php
blob: 81ffda8f8d5aad6e019706431ce7c5bd22c90eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

$log_file = file_get_contents(getenv("LOG_FILE"));
$BENCHMARK_RESULTS = substr($log_file, strpos($log_file, "Average:"));
$BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n"));
preg_match("/([0-9\.:]*)(.{0,2})/", trim(substr($BENCHMARK_RESULTS, strrpos($BENCHMARK_RESULTS, ':') + 1)), $match);

if($match[2] == "ms")
	echo $match[1] / 1000;
else
	echo $match[1];

?>