diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2007-01-23 10:26:06 +0000 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2007-01-23 10:26:06 +0000 |
commit | 4388450b48152e518269bf76cabf8487f557c50c (patch) | |
tree | 3fc9a02f7fba0530f2da593bb7885b06a970ba40 /benchmarks | |
parent | 4e34f47ce3d70d0eddea101c7038f39f5fc7d730 (diff) | |
download | ports-4388450b48152e518269bf76cabf8487f557c50c.tar.gz ports-4388450b48152e518269bf76cabf8487f557c50c.zip |
Notes
Diffstat (limited to 'benchmarks')
-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 e6b3c0bd7041..aaff80787487 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 be5ebd287f16..17a06399787c 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 42bb200e884c..309bcc1d414e 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 |