diff options
-rw-r--r-- | benchmarks/raidtest/Makefile | 2 | ||||
-rw-r--r-- | benchmarks/raidtest/files/Makefile | 2 | ||||
-rw-r--r-- | benchmarks/raidtest/files/raidtest.c | 12 |
3 files changed, 9 insertions, 7 deletions
diff --git a/benchmarks/raidtest/Makefile b/benchmarks/raidtest/Makefile index e6b3c0b..aaff807 100644 --- a/benchmarks/raidtest/Makefile +++ b/benchmarks/raidtest/Makefile @@ -7,7 +7,7 @@ # PORTNAME= raidtest -PORTVERSION= 1.0 +PORTVERSION= 1.1 CATEGORIES= benchmarks MASTER_SITES= # none DISTFILES= # none diff --git a/benchmarks/raidtest/files/Makefile b/benchmarks/raidtest/files/Makefile index be5ebd2..17a0639 100644 --- a/benchmarks/raidtest/files/Makefile +++ b/benchmarks/raidtest/files/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= raidtest -NOMAN= true +NO_MAN= true WARNS?= 6 BINDIR?= ${PREFIX}/bin diff --git a/benchmarks/raidtest/files/raidtest.c b/benchmarks/raidtest/files/raidtest.c index 42bb200..309bcc1 100644 --- a/benchmarks/raidtest/files/raidtest.c +++ b/benchmarks/raidtest/files/raidtest.c @@ -254,11 +254,11 @@ test_start(int fd, struct ioreq *iorqs, uintmax_t nreqs) } static void -show_stats(long secs, uintmax_t nbytes, uintmax_t nreqs) +show_stats(double secs, uintmax_t nbytes, uintmax_t nreqs) { - printf("Bytes per second: %ju\n", nbytes / secs); - printf("Requests per second: %ju\n", nreqs / secs); + printf("Bytes per second: %ju\n", (uintmax_t)(nbytes / secs)); + printf("Requests per second: %ju\n", (uintmax_t)(nreqs / secs)); } static void @@ -266,7 +266,7 @@ raidtest_test(int argc, char *argv[]) { uintmax_t i, nbytes, nreqs, nrreqs, nwreqs, reqs_per_proc, nstart; const char *dev, *file = NULL; - struct timeval tstart, tend; + struct timeval tstart, tend, tdiff; struct ioreq *iorqs; unsigned nprocs; struct stat sb; @@ -404,7 +404,9 @@ raidtest_test(int argc, char *argv[]) wait(&status); } gettimeofday(&tend, NULL); - show_stats(tend.tv_sec - tstart.tv_sec, nbytes, nreqs); + timersub(&tend, &tstart, &tdiff); + show_stats(tdiff.tv_sec + (double)tdiff.tv_usec / 1000000, + nbytes, nreqs); } int |