diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-05-08 22:03:36 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-05-08 22:03:36 -0400 |
commit | 811be430d248c49b9d45edae277b81a795a69a6d (patch) | |
tree | 5fc13068afb1197a2ad5ae018debcc2e06eca3c2 /pts/test-resources/sunflow | |
parent | 8e51f6d524caa78130edea788ae2083113774be5 (diff) | |
download | phoronix-test-suite-upstream-811be430d248c49b9d45edae277b81a795a69a6d.tar.gz phoronix-test-suite-upstream-811be430d248c49b9d45edae277b81a795a69a6d.tar.xz phoronix-test-suite-upstream-811be430d248c49b9d45edae277b81a795a69a6d.zip |
Fix from uncle_fungus for Sunflow results parsing
Diffstat (limited to 'pts/test-resources/sunflow')
-rw-r--r-- | pts/test-resources/sunflow/parse-results.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pts/test-resources/sunflow/parse-results.php b/pts/test-resources/sunflow/parse-results.php index d2332d2..1eab65a 100644 --- a/pts/test-resources/sunflow/parse-results.php +++ b/pts/test-resources/sunflow/parse-results.php @@ -2,6 +2,11 @@ $BENCHMARK_RESULTS = substr($argv[1], strpos($argv[1], "Average:")); $BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n")); -echo trim(substr($BENCHMARK_RESULTS, strrpos($BENCHMARK_RESULTS, ':') + 1)); +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]; ?> |