Skip to content

Commit

Permalink
Fix all the benchmark targets so they work properly, and work with the
Browse files Browse the repository at this point in the history
package uninstalled, with the exceptionof lmbench.  Make non-batch
targets for all the benchmarks, and create a results target which
places all the results in /tmp for easier collection.
  • Loading branch information
garbled committed Dec 26, 1998
1 parent 1da2cee commit f544fc1
Show file tree
Hide file tree
Showing 19 changed files with 147 additions and 43 deletions.
4 changes: 2 additions & 2 deletions benchmarks/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.12 1998/12/06 01:25:08 hubertf Exp $
# $NetBSD: Makefile,v 1.13 1998/12/26 15:59:56 garbled Exp $
# FreeBSD Id: Makefile,v 1.4 1997/02/16 13:32:59 andreas Exp
#

PKG_MISC_TARGETS?= benchmark
PKG_MISC_TARGETS?= benchmark results

SUBDIR += benchfft
SUBDIR += bonnie
Expand Down
17 changes: 13 additions & 4 deletions benchmarks/benchfft/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 1998/12/03 01:27:04 hubertf Exp $
# $NetBSD: Makefile,v 1.3 1998/12/26 15:59:55 garbled Exp $

DISTNAME= benchfft-2.0
CATEGORIES= benchmarks math
Expand Down Expand Up @@ -27,12 +27,21 @@ do-install:

benchmark:
.if defined(BATCH)
@${ECHO} "*** This benchmark may only be run in non-batch mode" ; \
exit 1
@${ECHO} "*** This benchmark should be run in non-batch mode"
@${SED} -e 's|bench-fft|./bench|g' <${WRKSRC}/submit-script> ${WRKSRC}/run_bench
@chmod 755 ${WRKSRC}/run_bench
@${SED} -e 's|@machine@|'`uname -m`'|' \
${FILESDIR}/setup.answers | (cd ${WRKSRC} ; ./run_bench)
.else
@${WRKSRC}/submit-script
@${SED} -e 's|bench-fft|./bench|g' <${WRKSRC}/submit-script> ${WRKSRC}/run_bench
@chmod 755 ${WRKSRC}/run_bench
@(cd ${WRKSRC} ; ./run_bench)
@${ECHO} ${PKGNAME} results:
${CAT} submit.txt
.endif

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/submit.txt /tmp/benches/`domainname`/fft.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
16 changes: 16 additions & 0 deletions benchmarks/benchfft/files/setup.answers
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pkg run
n
n
NetBSD
NetBSD
@machine@
@machine@
100
64
0
NetBSD
gcc
y
f77
y
Do not submit this form
8 changes: 6 additions & 2 deletions benchmarks/bonnie/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 1998/09/24 09:20:08 agc Exp $
# $NetBSD: Makefile,v 1.12 1998/12/26 15:59:55 garbled Exp $
# FreeBSD Id: Makefile,v 1.5 1997/11/26 23:09:14 jseger Exp
#

Expand All @@ -23,6 +23,10 @@ post-extract:
${MV} ${WRKSRC}/Bonnie.c ${WRKSRC}/bonnie.c

benchmark:
@(cd ${WRKSRC}; ./bonnie)
@(cd ${WRKSRC}; ./bonnie | tee bonnie.out)

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/bonnie.out /tmp/benches/`domainname`/bonnie.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/bytebench/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 1998/12/03 01:27:05 hubertf Exp $
# $NetBSD: Makefile,v 1.4 1998/12/26 15:59:55 garbled Exp $

DISTNAME= byte
PKGNAME= bytebench-3.6
Expand All @@ -20,6 +20,10 @@ do-install:

benchmark:
@if [ `id -u` != 0 ]; then echo "This benchmark must be run as root!" ; exit 1 ; fi
@${WRKSRC}/run-byte
@${WRKSRC}/run-byte | tee ${WRKSRC}/bytebench.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/bytebench.out /tmp/benches/`domainname`/bytebench.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
10 changes: 7 additions & 3 deletions benchmarks/dhrystone/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 1998/09/24 09:23:32 agc Exp $
# $NetBSD: Makefile,v 1.3 1998/12/26 15:59:55 garbled Exp $

DISTNAME= dhry2.1
PKGNAME= dhrystone-2.1
Expand All @@ -18,7 +18,11 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/Rationale ${PREFIX}/share/doc/dhrystone

benchmark:
-${ECHO} 1000000 | ${WRKSRC}/dry2
-${ECHO} 1000000 | ${WRKSRC}/dry2reg
-@${ECHO} 5000000 | ${WRKSRC}/dry2 | tee ${WRKSRC}/dry.out
-@${ECHO} 5000000 | ${WRKSRC}/dry2reg | tee -a ${WRKSRC}/dry.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/dry.out /tmp/benches/`domainname`/dhrystone.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/fib/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 1998/10/22 05:55:46 garbled Exp $
# $NetBSD: Makefile,v 1.2 1998/12/26 15:59:55 garbled Exp $

DISTNAME= fib.c
PKGNAME= fib-980203
Expand All @@ -21,6 +21,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/fib ${PREFIX}/bin

benchmark:
-@${WRKSRC}/fib
-@${WRKSRC}/fib | tee ${WRKSRC}/fib.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/fib.out /tmp/benches/`domainname`/fib.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/flops/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 1998/10/22 05:26:33 garbled Exp $
# $NetBSD: Makefile,v 1.2 1998/12/26 15:59:55 garbled Exp $

DISTNAME= flops
PKGNAME= flops-2.0
Expand All @@ -25,6 +25,10 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/flops.doc ${PREFIX}/share/doc/flops

benchmark:
-@${WRKSRC}/flops
-@${WRKSRC}/flops | tee ${WRKSRC}/flops.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/flops.out /tmp/benches/`domainname`/flops.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
15 changes: 13 additions & 2 deletions benchmarks/hbench/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 1998/12/03 01:27:05 hubertf Exp $
# $NetBSD: Makefile,v 1.7 1998/12/26 15:59:55 garbled Exp $

DISTNAME= hbench-OS-1.0
PKGNAME= hbench-1.0
Expand Down Expand Up @@ -42,10 +42,21 @@ do-install:

benchmark:
@if [ `id -u` != 0 ]; then echo "This benchmark must be run as root!" ; exit 1 ; fi
@cd ${WRKSRC}; \
cd ${WRKSRC}; \
${MKDIR} conf; \
${MKDIR} results; \
${SED} -e 's|@pwd@|'`/bin/pwd`'|g' \
-e 's|@hostname@|'`/bin/hostname -s`'|g' \
-e 's|@wrksrc@|'`/bin/pwd`'|g' \
${FILESDIR}/setup.answers | ${MAKE} setup; \
${MV} conf/`/bin/hostname -s`.run conf/foo ; \
${SED} -e 's|#PLAINBINDIR=${HBENCHROOT}|PLAINBINDIR='`/bin/pwd`'|' \
< conf/foo > conf/`/bin/hostname -s`.run ; \
${MAKE} run

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cd ${WRKSRC} ; \
tar -cf /tmp/benches/`domainname`/hbench.`uname`-`uname -m`-`uname -r`.`hostname`.tar results conf

.include "../../mk/bsd.pkg.mk"
10 changes: 4 additions & 6 deletions benchmarks/hbench/files/setup.answers
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@



@wrksrc@/conf/full.test

@wrksrc@/XXX
@wrksrc@






@pwd@/results
@pwd@/conf/@[email protected]


8 changes: 6 additions & 2 deletions benchmarks/heapsort/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 1998/10/22 06:07:24 garbled Exp $
# $NetBSD: Makefile,v 1.2 1998/12/26 15:59:56 garbled Exp $

DISTNAME= heapsort.c
PKGNAME= heapsort-1.0
Expand All @@ -21,6 +21,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/heapsort ${PREFIX}/bin

benchmark:
-@${WRKSRC}/heapsort
-@${WRKSRC}/heapsort | tee ${WRKSRC}/heapsort.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/heapsort.out /tmp/benches/`domainname`/heapsort.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/hint/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 1998/12/03 01:27:05 hubertf Exp $
# $NetBSD: Makefile,v 1.4 1998/12/26 15:59:56 garbled Exp $
#
# New ports collection makefile for: hint
# Version required: 12 June 1998 (no version stamp)
Expand Down Expand Up @@ -26,6 +26,10 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/hint.1 ${PREFIX}/man/man1

benchmark:
cd ${WRKSRC} ; mkdir -p data ; ./DOUBLE
cd ${WRKSRC} ; mkdir -p data ; ./DOUBLE | tee hint.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/hint.out /tmp/benches/`domainname`/hint.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/iozone/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 1998/09/24 09:20:08 agc Exp $
# $NetBSD: Makefile,v 1.5 1998/12/26 15:59:56 garbled Exp $

DISTNAME= iozone
PKGNAME= iozone-1.14b
Expand All @@ -17,6 +17,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/iozone ${PREFIX}/bin

benchmark:
@(cd ${WRKSRC}; ./iozone)
@(cd ${WRKSRC}; ./iozone 100 | tee iozone.out)

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/iozone.out /tmp/benches/`domainname`/iozone.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
11 changes: 8 additions & 3 deletions benchmarks/linpack/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.2 1998/09/23 17:00:35 agc Exp $
# $NetBSD: Makefile,v 1.3 1998/12/26 15:59:56 garbled Exp $

DISTNAME= linpackc
PKGNAME= linpack-940225
Expand All @@ -23,7 +23,12 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/linpacks ${PREFIX}/bin

benchmark:
-@${WRKSRC}/linpacks
-@${WRKSRC}/linpackd
-@${WRKSRC}/linpacks | tee ${WRKSRC}/linpacks.out
-@${WRKSRC}/linpackd | tee ${WRKSRC}/linpackd.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/linpacks.out /tmp/benches/`domainname`/linpacks.`uname`-`uname -m`-`uname -r`.`hostname`
-@cp ${WRKSRC}/linpackd.out /tmp/benches/`domainname`/linpackd.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
18 changes: 15 additions & 3 deletions benchmarks/lmbench/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 1998/12/03 01:27:05 hubertf Exp $
# $NetBSD: Makefile,v 1.4 1998/12/26 15:59:56 garbled Exp $

DISTNAME= lmbench-2alpha11
PKGNAME= lmbench-2.11a
Expand Down Expand Up @@ -31,12 +31,24 @@ do-install:
.include "../../mk/bsd.prefs.mk"

benchmark:
.if exists(${PREFIX}/bin/lmbench/hello)
.if defined(BATCH)
@${ECHO} "*** This benchmark may only be run in non-batch mode" ; \
exit 1
@${ECHO} "*** This benchmark should only be run in non-batch mode" ; \
if [ `id -u` != 0 ]; then echo "This benchmark must be run as root!" ; exit 1 ; fi ; \
@${SED} -e 's|@wrksrc@|${WRKSRC}|' < ${FILESDIR}/setup.answers | \
(cd ${WRKSRC}/src; ${GMAKE} results)
.else
@if [ `id -u` != 0 ]; then echo "This benchmark must be run as root!" ; exit 1 ; fi
@cd ${WRKSRC}/src; ${GMAKE} results
.endif
.else
@${ECHO} "*** This benchmark must be installed to run" ; \
exit 1
.endif

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cd ${PREFIX}/share/lmbench ; \
tar -cf /tmp/benches/`domainname`/lmbench.`uname`-`uname -m`-`uname -r`.`hostname`.tar results

.include "../../mk/bsd.pkg.mk"
9 changes: 9 additions & 0 deletions benchmarks/lmbench/files/setup.answers
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@





@wrksrc@


no
8 changes: 6 additions & 2 deletions benchmarks/nsieve/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 1998/10/22 06:23:09 garbled Exp $
# $NetBSD: Makefile,v 1.2 1998/12/26 15:59:56 garbled Exp $

DISTNAME= nsieve.c
PKGNAME= nsieve-1.2b
Expand All @@ -21,6 +21,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/nsieve ${PREFIX}/bin

benchmark:
-@${WRKSRC}/nsieve
-@${WRKSRC}/nsieve | tee ${WRKSRC}/nsieve.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/nsieve.out /tmp/benches/`domainname`/nsieve.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/paranoia/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 1998/09/24 09:08:16 agc Exp $
# $NetBSD: Makefile,v 1.4 1998/12/26 15:59:56 garbled Exp $

DISTNAME= paranoia
PKGNAME= paranoia-960101
Expand All @@ -20,6 +20,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/paranoia ${PREFIX}/bin

benchmark:
@(cd ${WRKSRC}; ./paranoia < ${FILESDIR}/paranoia.run)
@(cd ${WRKSRC}; ./paranoia < ${FILESDIR}/paranoia.run | tee paranoia.out)

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/paranoia.out /tmp/benches/`domainname`/paranoia.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"
8 changes: 6 additions & 2 deletions benchmarks/whetstone/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 1998/09/24 09:19:10 agc Exp $
# $NetBSD: Makefile,v 1.4 1998/12/26 15:59:56 garbled Exp $

DISTNAME= whetstone
PKGNAME= whetstone-1.2
Expand All @@ -20,6 +20,10 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/whetstone ${PREFIX}/bin

benchmark:
@${WRKSRC}/whetstone
@${WRKSRC}/whetstone 80000 | tee ${WRKSRC}/whetstone.out

results:
-@${MKDIR} /tmp/benches/`domainname`
-@cp ${WRKSRC}/whetstone.out /tmp/benches/`domainname`/whetstone.`uname`-`uname -m`-`uname -r`.`hostname`

.include "../../mk/bsd.pkg.mk"

0 comments on commit f544fc1

Please sign in to comment.