diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-29 11:23:21 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-29 11:23:21 -0400 |
commit | d2993872f1e7598e90e22cada8d58fabcb6443c1 (patch) | |
tree | e104a8cca259dcce012c95f3a7d311c1f9981fdd /pts/test-resources/compress-gzip | |
parent | d8f940cde35c8423043bd37c58f00f57e901e66b (diff) | |
download | phoronix-test-suite-upstream-d2993872f1e7598e90e22cada8d58fabcb6443c1.tar.gz phoronix-test-suite-upstream-d2993872f1e7598e90e22cada8d58fabcb6443c1.tar.xz phoronix-test-suite-upstream-d2993872f1e7598e90e22cada8d58fabcb6443c1.zip |
Change benchmark-profiles/, benchmark-resources/, and benchmark-suites/ to test-profiles/, test-resources/, and test-suites/
Diffstat (limited to 'pts/test-resources/compress-gzip')
-rw-r--r-- | pts/test-resources/compress-gzip/install.sh | 24 | ||||
-rw-r--r-- | pts/test-resources/compress-gzip/parse-results.php | 5 | ||||
-rw-r--r-- | pts/test-resources/compress-gzip/pre.sh | 4 |
3 files changed, 33 insertions, 0 deletions
diff --git a/pts/test-resources/compress-gzip/install.sh b/pts/test-resources/compress-gzip/install.sh new file mode 100644 index 0000000..aa18ac5 --- /dev/null +++ b/pts/test-resources/compress-gzip/install.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +cd $1 + +if [ ! -f ../pts-shared/pts-wav-sample-file.wav ] + then + wget http://www.phoronix-test-suite.com/benchmark-files/pts-wav-sample-file.tar.bz2 -O ../pts-shared/pts-wav-sample-file.tar.bz2 + tar -jxvf ../pts-shared/pts-wav-sample-file.tar.bz2 -C ../pts-shared/ + rm -f ../pts-shared/pts-wav-sample-file.tar.bz2 +fi + +cat > gzip_bigfile <<EOT +#!/bin/sh +for i in 1 2 3 4 5 6 7 8; do cat ../pts-shared/pts-wav-sample-file.wav; done|gzip -c >/dev/null +EOT +chmod +x gzip_bigfile + +cat > compress-gzip <<EOT +#!/bin/sh +/usr/bin/time -f "Gzip Compress Time: %e Seconds" ./gzip_bigfile 2>&1 +EOT +chmod +x compress-gzip + + diff --git a/pts/test-resources/compress-gzip/parse-results.php b/pts/test-resources/compress-gzip/parse-results.php new file mode 100644 index 0000000..6a06944 --- /dev/null +++ b/pts/test-resources/compress-gzip/parse-results.php @@ -0,0 +1,5 @@ +<?php + +$BENCHMARK_RESULTS = substr($argv[1], strrpos($argv[1], "Gzip Compress Time:") + 19); +echo trim(substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "Seconds"))); +?> diff --git a/pts/test-resources/compress-gzip/pre.sh b/pts/test-resources/compress-gzip/pre.sh new file mode 100644 index 0000000..f53506f --- /dev/null +++ b/pts/test-resources/compress-gzip/pre.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $1 +cat ../pts-shared/pts-wav-sample-file.wav > /dev/null |