X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=tools%2Freadtest.c;h=9a431fd2fbdd5b284495670bbaf4beefb123a619;hb=f699773490ffc4b7380eede4e529c66416f965ac;hp=95907f530e2489a3e920cdf4f1a79426515d568e;hpb=b0405c3c2ce0038cf8e4fac3fd17df80a475f1d1;p=ardour.git diff --git a/tools/readtest.c b/tools/readtest.c index 95907f530e..9a431fd2fb 100644 --- a/tools/readtest.c +++ b/tools/readtest.c @@ -61,7 +61,7 @@ main (int argc, char* argv[]) int n = 0; int nfiles = 0; int quiet = 0; - + while (1) { if ((c = getopt_long (argc, argv, optstring, longopts, &option_index)) == -1) { break; @@ -97,7 +97,7 @@ main (int argc, char* argv[]) return 0; } } - + if (optind < argc) { name_template = argv[optind]; } else { @@ -129,7 +129,7 @@ main (int argc, char* argv[]) if (!quiet) { printf ("# Discovered %d files using %s\n", n, name_template); } - + nfiles = n; files = (int *) malloc (sizeof (int) * nfiles); #ifdef HAVE_MMAP @@ -233,7 +233,7 @@ main (int argc, char* argv[]) if (!quiet) { printf ("# BW @ %lu %.3f seconds bandwidth %.4f MB/sec\n", (long unsigned int)_read, elapsed/1000000.0, bandwidth); } - + total_time += elapsed; ++cnt; @@ -259,6 +259,7 @@ out: 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 ("# seeks: %llu: bytes: %llu total_time: %f\n", cnt * nfiles, (nfiles * _read), total_time/1000000.0); printf ("%d %.4f %.4f %.4f %.5f\n", block_size, min_throughput, bandwidth, max_elapsed/1000000.0, stddev/1000000.0); }