diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-22 09:27:17 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-22 09:27:17 -0400 |
commit | 09e1753da59c9e36a37a28764aa4a7142024da7c (patch) | |
tree | 232d570b45d20e5426817d826c4ccde412238860 /pts/test-resources/iozone | |
parent | f57fa1e2f7e81ac0ac630cd864d156720f02d3e3 (diff) | |
download | phoronix-test-suite-upstream-09e1753da59c9e36a37a28764aa4a7142024da7c.tar.gz phoronix-test-suite-upstream-09e1753da59c9e36a37a28764aa4a7142024da7c.tar.xz phoronix-test-suite-upstream-09e1753da59c9e36a37a28764aa4a7142024da7c.zip |
pts: iozone improve parse-results.php
Diffstat (limited to 'pts/test-resources/iozone')
-rw-r--r-- | pts/test-resources/iozone/parse-results.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/pts/test-resources/iozone/parse-results.php b/pts/test-resources/iozone/parse-results.php index ec1fb84..2bece97 100644 --- a/pts/test-resources/iozone/parse-results.php +++ b/pts/test-resources/iozone/parse-results.php @@ -1,11 +1,29 @@ <?php -$BENCHMARK_RESULTS = substr($argv[1], strrpos($argv[1], " 904800 ")); +// find the line with "reclean" on it +$BENCHMARK_RESULTS = substr($argv[1], strrpos($argv[1], "reclen")); +// skip to the next line +$BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, 1+strpos($BENCHMARK_RESULTS, "\n")); +// remove stuff after this line $BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n")); + +// break up the line into columns based on whitespace $BENCHMARK_RESULTS = explode(" ", $BENCHMARK_RESULTS); $R_count = 0; $result = 0; + +/* This loop picks out the result value from either the 3rd or the 5th + column. If both columns contain a value then the 5th column is + used, which is the read time. If only the 3rd column contains a + value then it is used as the write time. + +Example: + + KB reclen write rewrite read reread read write ... +512000 1 47591 19718 129991 106731 +*/ + foreach($BENCHMARK_RESULTS as $R) { if(!empty($R)) |