summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-01-28 14:35:17 +0100
committerRobin Gareus <robin@gareus.org>2015-01-28 14:43:35 +0100
commit07e53fc2e77462e2e5029dc4e7ac1437c7f6a861 (patch)
tree020faeca940081fad4baf83a053796385398e4c3
parentcf8e7bc135d356c7cb77730ab289696d006924e6 (diff)
read-test format directly for gnuplot
-rw-r--r--tools/readtest.c11
-rwxr-xr-xtools/run-readtest.sh6
2 files changed, 9 insertions, 8 deletions
diff --git a/tools/readtest.c b/tools/readtest.c
index aebc53718c..00b761a654 100644
--- a/tools/readtest.c
+++ b/tools/readtest.c
@@ -106,7 +106,7 @@ main (int argc, char* argv[])
}
if (!quiet) {
- printf ("Discovered %d files using %s\n", n, name_template);
+ printf ("# Discovered %d files using %s\n", n, name_template);
}
nfiles = n;
@@ -160,7 +160,7 @@ main (int argc, char* argv[])
double bandwidth = ((nfiles * block_size)/1048576.0) / (elapsed/1000000.0);
if (!quiet) {
- printf ("BW @ %lu %.3f seconds bandwidth %.4f MB/sec\n", (long unsigned int)_read, elapsed/1000000.0, bandwidth);
+ printf ("# BW @ %lu %.3f seconds bandwidth %.4f MB/sec\n", (long unsigned int)_read, elapsed/1000000.0, bandwidth);
}
total_time += elapsed;
@@ -175,9 +175,10 @@ out:
if (max_elapsed > 0 && total_time > 0) {
double bandwidth = ((nfiles * _read)/1048576.0) / (total_time/1000000.0);
double min_throughput = ((nfiles * block_size)/1048576.0) / (max_elapsed/1000000.0);
- printf ("Min: %.4f MB/sec Avg: %.4f MB/sec || Max: %.3f sec \n", min_throughput, bandwidth, max_elapsed/1000000.0);
- printf ("Max Track count: %d @ 48000SPS\n", (int) floor(1048576.0 * bandwidth / (4 * 48000.)));
- printf ("Sus Track count: %d @ 48000SPS\n", (int) floor(1048576.0 * min_throughput / (4 * 48000.)));
+ printf ("# Min: %.4f MB/sec Avg: %.4f MB/sec || Max: %.3f sec \n", min_throughput, bandwidth, max_elapsed/1000000.0);
+ printf ("# Max Track count: %d @ 48000SPS\n", (int) floor(1048576.0 * bandwidth / (4 * 48000.)));
+ printf ("# Sus Track count: %d @ 48000SPS\n", (int) floor(1048576.0 * min_throughput / (4 * 48000.)));
+ printf ("%d %.4f %.4f %.4f\n", block_size, min_throughput, bandwidth, max_elapsed/1000000.0);
}
return 0;
diff --git a/tools/run-readtest.sh b/tools/run-readtest.sh
index 38fb61d1d2..004920d35c 100755
--- a/tools/run-readtest.sh
+++ b/tools/run-readtest.sh
@@ -27,7 +27,7 @@ done
if [ -d $dir -a -f $dir/testfile_1 ] ; then
# dir exists and has a testfile within it - reuse to avoid
# recreating files
- echo "Re-using files in $dir"
+ echo "# Re-using files in $dir"
needfiles=
else
dir=$dir/readtest_$$
@@ -40,7 +40,7 @@ else
fi
if [ x$needfiles != x ] ; then
- echo "Building files for test..."
+ echo "# Building files for test..."
if [ x$interleave = x ] ; then
#
@@ -81,6 +81,6 @@ for bs in $@ ; do
:
fi
- echo "Blocksize $bs"
+ echo "# Blocksize $bs"
./readtest $nocache -b $bs -q $dir/testfile_%d
done