mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
read-test format directly for gnuplot
This commit is contained in:
parent
cf8e7bc135
commit
07e53fc2e7
2 changed files with 9 additions and 8 deletions
|
|
@ -106,7 +106,7 @@ main (int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
printf ("Discovered %d files using %s\n", n, name_template);
|
printf ("# Discovered %d files using %s\n", n, name_template);
|
||||||
}
|
}
|
||||||
|
|
||||||
nfiles = n;
|
nfiles = n;
|
||||||
|
|
@ -160,7 +160,7 @@ main (int argc, char* argv[])
|
||||||
double bandwidth = ((nfiles * block_size)/1048576.0) / (elapsed/1000000.0);
|
double bandwidth = ((nfiles * block_size)/1048576.0) / (elapsed/1000000.0);
|
||||||
|
|
||||||
if (!quiet) {
|
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;
|
total_time += elapsed;
|
||||||
|
|
@ -175,9 +175,10 @@ out:
|
||||||
if (max_elapsed > 0 && total_time > 0) {
|
if (max_elapsed > 0 && total_time > 0) {
|
||||||
double bandwidth = ((nfiles * _read)/1048576.0) / (total_time/1000000.0);
|
double bandwidth = ((nfiles * _read)/1048576.0) / (total_time/1000000.0);
|
||||||
double min_throughput = ((nfiles * block_size)/1048576.0) / (max_elapsed/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 ("# 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 ("# 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 ("# 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;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ done
|
||||||
if [ -d $dir -a -f $dir/testfile_1 ] ; then
|
if [ -d $dir -a -f $dir/testfile_1 ] ; then
|
||||||
# dir exists and has a testfile within it - reuse to avoid
|
# dir exists and has a testfile within it - reuse to avoid
|
||||||
# recreating files
|
# recreating files
|
||||||
echo "Re-using files in $dir"
|
echo "# Re-using files in $dir"
|
||||||
needfiles=
|
needfiles=
|
||||||
else
|
else
|
||||||
dir=$dir/readtest_$$
|
dir=$dir/readtest_$$
|
||||||
|
|
@ -40,7 +40,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x$needfiles != x ] ; then
|
if [ x$needfiles != x ] ; then
|
||||||
echo "Building files for test..."
|
echo "# Building files for test..."
|
||||||
if [ x$interleave = x ] ; then
|
if [ x$interleave = x ] ; then
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -81,6 +81,6 @@ for bs in $@ ; do
|
||||||
:
|
:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Blocksize $bs"
|
echo "# Blocksize $bs"
|
||||||
./readtest $nocache -b $bs -q $dir/testfile_%d
|
./readtest $nocache -b $bs -q $dir/testfile_%d
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue