diff options
author | garbled <garbled@pkgsrc.org> | 1998-09-05 22:02:19 +0000 |
---|---|---|
committer | garbled <garbled@pkgsrc.org> | 1998-09-05 22:02:19 +0000 |
commit | 7844b74891a6d40faee5dfb3cb2d01e2d1f220c6 (patch) | |
tree | ed4f8f7e72bda7953411cca2f76f81d77b33fd96 /benchmarks | |
parent | 52228019a51663f9c285c2620c2c30f80919398f (diff) | |
download | pkgsrc-7844b74891a6d40faee5dfb3cb2d01e2d1f220c6.tar.gz |
New pkg for hbench-OS-1.0 (hi matt!)
a suite of portable benchmarks to measure the OS and the hardware.
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/hbench/Makefile | 53 | ||||
-rw-r--r-- | benchmarks/hbench/files/md5 | 3 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-aa | 111 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ab | 19 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ac | 19 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ad | 19 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ae | 151 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-af | 22 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ag | 31 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ah | 76 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-ai | 28 | ||||
-rw-r--r-- | benchmarks/hbench/patches/patch-aj | 16 | ||||
-rw-r--r-- | benchmarks/hbench/pkg/COMMENT | 1 | ||||
-rw-r--r-- | benchmarks/hbench/pkg/DESCR | 9 | ||||
-rw-r--r-- | benchmarks/hbench/pkg/MESSAGE | 3 | ||||
-rw-r--r-- | benchmarks/hbench/pkg/PLIST.common | 27 | ||||
-rw-r--r-- | benchmarks/hbench/pkg/PLIST.i386 | 29 | ||||
-rw-r--r-- | benchmarks/hbench/pkg/PLIST.md | 28 | ||||
-rwxr-xr-x | benchmarks/hbench/scripts/do-install | 34 |
19 files changed, 679 insertions, 0 deletions
diff --git a/benchmarks/hbench/Makefile b/benchmarks/hbench/Makefile new file mode 100644 index 00000000000..394dc457058 --- /dev/null +++ b/benchmarks/hbench/Makefile @@ -0,0 +1,53 @@ +# $NetBSD: Makefile,v 1.1 1998/09/05 22:02:19 garbled Exp $ + +DISTNAME= hbench-OS-1.0 +PKGNAME= hbench-1.0 +CATEGORIES= benchmarks +MASTER_SITES= ftp://ftp.eecs.harvard.edu/pub/hbench-OS/ + +MAINTAINER= root@garbled.net +HOMEPAGE= http://www.eecs.harvard.edu/vino/perf/hbench/ + +DEPENDS+= gnuplot-3.5:../../graphics/gnuplot + +ALL_TARGET= build +USE_PERL5= yes +WRKSRC= ${WRKDIR}/hbench-OS +NETBSDVER!= echo `uname -s|tr '[A-Z]' '[a-z]'``uname -r`-`uname -m` +ARCH!= echo `uname -m` + +post-patch: + @if [ ${ARCH} = i386 ];then \ + ${CAT} ${PKGDIR}/PLIST.md ${PKGDIR}/PLIST.i386 ${PKGDIR}/PLIST.common >foo ;\ + else \ + ${CAT} ${PKGDIR}/PLIST.md ${PKGDIR}/PLIST.common >foo ;\ + fi + @sed -e 's@XXXNETBSDVERXXX@${NETBSDVER}@' <foo> ${PKGDIR}/PLIST + @${RM} -f foo + +post-configure: + @${MV} ${WRKSRC}/scripts/create-all-analyses foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/create-all-analyses + @${MV} ${WRKSRC}/scripts/create-all-latgraphs foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/create-all-latgraphs + @${MV} ${WRKSRC}/scripts/create-all-summaries foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/create-all-summaries + @${MV} ${WRKSRC}/scripts/gen-analysis foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/gen-analysis + @${MV} ${WRKSRC}/scripts/gen-latgraph foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/gen-latgraph + @${MV} ${WRKSRC}/scripts/gen-summary foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/gen-summary + @${MV} ${WRKSRC}/scripts/interactive-setup foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/interactive-setup + @${MV} ${WRKSRC}/scripts/maindriver foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/maindriver + @${MV} ${WRKSRC}/Results/Makefile foo + ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/Results/Makefile + @${RM} -f foo + @chmod 0755 ${WRKSRC}/scripts/* + +do-install: + @${SETENV} PREFIX=${PREFIX} WRKSRC=${WRKSRC} ${SCRIPTDIR}/do-install + +.include "../../mk/bsd.pkg.mk" diff --git a/benchmarks/hbench/files/md5 b/benchmarks/hbench/files/md5 new file mode 100644 index 00000000000..24c6f4df9aa --- /dev/null +++ b/benchmarks/hbench/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1 1998/09/05 22:02:19 garbled Exp $ + +MD5 (hbench-OS-1.0.tar.gz) = 3de3013a7caf9b2fc59bc8344e61238e diff --git a/benchmarks/hbench/patches/patch-aa b/benchmarks/hbench/patches/patch-aa new file mode 100644 index 00000000000..65663fdc405 --- /dev/null +++ b/benchmarks/hbench/patches/patch-aa @@ -0,0 +1,111 @@ +$NetBSD: patch-aa,v 1.1 1998/09/05 22:02:19 garbled Exp $ +--- scripts/interactive-setup.orig Thu Jun 26 17:37:25 1997 ++++ scripts/interactive-setup Sat Sep 5 09:59:03 1998 +@@ -35,7 +35,7 @@ + + # Setup defaults. + SYSTEMNAME=$HOSTNAME +-HOSTTYPE=`${SHELL} ./scripts/config.guess` ++HOSTTYPE=`${SHELL} XXXPREFIXXXX/bin/hbench/config.guess` + ARCH=`echo ${HOSTTYPE} | sed 's/-.*-.*$//'` + OSTYPE=`echo ${HOSTTYPE} | sed 's/^.*-.*-//'` + CYCLECOUNTER=NO +@@ -44,8 +44,8 @@ + TESTFILE=full.test + NRUNS=10 + RAWDISK=none +-SCRATCHFILE=/usr/tmp/XXX +-SCRATCHDIR=/usr/tmp ++SCRATCHFILE=/tmp/XXX ++SCRATCHDIR=/tmp + REMOTE="" + NETWORKS="" + PLAINBINDIR= +@@ -63,8 +63,8 @@ + Welcome to HBench-OS! Before you can run the benchmarks, you need to + set up a few configuration parameters. This script will allow you to + interactively build a configuration file for this particular system; +-it will be saved by default in ./conf/${HOSTNAME}.run, unless you +-specify otherwise below. Once you have created ./conf/${HOSTNAME}.run, ++it will be saved by default in XXXPREFIXXXX/share/hbench/conf/${HOSTNAME}.run, unless you ++specify otherwise below. Once you have created XXXPREFIXXXX/share/hbench/conf/${HOSTNAME}.run, + either via this script, or manually, you can run the benchmarks by invoking + + make run +@@ -108,8 +108,8 @@ + + # Now that we've got the hostname, try to read an existing run file + # to provide defaults. +-if [ -f ./conf/${SYSTEMNAME}.run ]; then +- . ./conf/${SYSTEMNAME}.run ++if [ -f XXXPREFIXXXX/share/hbench/conf/${SYSTEMNAME}.run ]; then ++ . XXXPREFIXXXX/share/hbench/conf/${SYSTEMNAME}.run + fi + + +@@ -119,7 +119,7 @@ + echo $ECHON " System type (arch-vendor-os)? [default ${HOSTTYPE}] $ECHOC" + read PLATFORMIN + if [ X${PLATFORMIN}X != XX ]; then +- PLATFORMCHK=`${SHELL} ./scripts/config.sub $PLATFORMIN 2>&1` ++ PLATFORMCHK=`${SHELL} XXXPREFIXXXX/bin/hbench/config.sub $PLATFORMIN 2>&1` + if [ $? -eq 0 ]; then + HOSTTYPE=$PLATFORMCHK + AGAIN=N +@@ -191,10 +191,10 @@ + + HBench-OS determines what benchmarks to run by reading in a file that + specifies which benchmarks to include and what parameters to pass them. +-By default, the file ./conf/full.test is used, which runs the entire ++By default, the file XXXPREFIXXXX/share/hbench/conf/full.test is used, which runs the entire + HBench-OS benchmark suite. This is recommended for basic use; however, + if you are interested is a specific set of benchmarks, create a new +-test file in the ./conf directory and enter its name below (without ++test file in the XXXPREFIXXXX/share/hbench/conf directory and enter its name below (without + a directory specifier): + + EOF +@@ -297,7 +297,7 @@ + lat_rpc, lat_connect) run and measure the clients locally, but execute + the servers on a remote networked machine. Standard (non-counter-enabled) + binaries for each remote machine's architecture MUST be available in the +-./bin directory for the remote tests to work. Also, note that, for best ++XXXPREFIXXXX/bin/hbench directory for the remote tests to work. Also, note that, for best + results, the remote machines should be identical to the local machine, + and the network connecting them should be dedicated and quiescent. + +@@ -345,13 +345,14 @@ + + By default, HBench-OS places results in a subdirectory <hostname>.run#/ + of the base result directory. The default for the base run directory +-is ./Results/<os>-<arch>/, in this case ./Results/${OSTYPE}-${ARCH}/. If ++is XXXPREFIXXXX/share/hbench/Results/<os>-<arch>/, in this case ++XXXPREFIXXXX/share/hbench/Results/${OSTYPE}-${ARCH}/. If + you wish to alter the base directory location, enter the new directory now, + or just press Enter for the default: + + EOF + +-echo $ECHON " Alternate resultbase directory? [default ./Results/${OSTYPE}-${ARCH}] $ECHOC" ++echo $ECHON " Alternate resultbase directory? [default XXXPREFIXXXX/share/hbench/Results/${OSTYPE}-${ARCH}] $ECHOC" + read RDBIN + if [ X${RDBIN}X != XX ]; then + RESULTDIRBASE=$RDBIN +@@ -360,7 +361,7 @@ + fi + + # Pick a run filename +-RUNFILE=./conf/${SYSTEMNAME}.run ++RUNFILE=XXXPREFIXXXX/share/hbench/conf/${SYSTEMNAME}.run + cat <<EOF + + By default, HBench-OS selects a .run file based on the machine's hostname. +@@ -380,7 +381,7 @@ + + Finally, note that if you have not built the HBench-OS binaries for your + architecture and counter selections in the default location +-(./bin/${OSTYPE}-${ARCH}/), then you must edit the generated run file ++(XXXPREFIXXXX/bin/hbench/${OSTYPE}-${ARCH}/), then you must edit the generated run file + manually to indicate where those binaries are. + + =========== diff --git a/benchmarks/hbench/patches/patch-ab b/benchmarks/hbench/patches/patch-ab new file mode 100644 index 00000000000..b63bcde8b6a --- /dev/null +++ b/benchmarks/hbench/patches/patch-ab @@ -0,0 +1,19 @@ +$NetBSD: patch-ab,v 1.1 1998/09/05 22:02:19 garbled Exp $ +--- scripts/create-all-analyses.orig Sat Sep 5 09:10:32 1998 ++++ scripts/create-all-analyses Sat Sep 5 09:12:41 1998 +@@ -31,13 +31,10 @@ + # + # $Id: patch-ab,v 1.1 1998/09/05 22:02:19 garbled Exp $ + +-# Step 1: Discover hbench root path +-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)` +- +-for dir in */* ++for dir in XXXPREFIXXXX/share/hbench/*/* + do + if [ -d $dir ]; then + echo "Running analysis on $dir..." +- ${HBENCHROOT}/scripts/gen-analysis $dir > ${dir}/analysis ++ XXXPREFIXXXX/bin/hbench/gen-analysis $dir > ${dir}/analysis + fi + done diff --git a/benchmarks/hbench/patches/patch-ac b/benchmarks/hbench/patches/patch-ac new file mode 100644 index 00000000000..8f40fde7be2 --- /dev/null +++ b/benchmarks/hbench/patches/patch-ac @@ -0,0 +1,19 @@ +$NetBSD: patch-ac,v 1.1 1998/09/05 22:02:19 garbled Exp $ +--- scripts/create-all-latgraphs.orig Sat Sep 5 09:13:21 1998 ++++ scripts/create-all-latgraphs Sat Sep 5 09:13:57 1998 +@@ -33,13 +33,10 @@ + # + # $Id: patch-ac,v 1.1 1998/09/05 22:02:19 garbled Exp $ + +-# Step 1: Discover hbench root path +-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)` +- +-for dir in */* ++for dir in XXXPREFIXXXX/share/hbench/*/* + do + if [ -d $dir -a -d ${dir}/lat_mem_rd ]; then + echo "Generating latency graph for $dir..." +- ${HBENCHROOT}/scripts/gen-latgraph -ps ${dir}/lat_mem_rd ++ XXXPREFIXXXX/bin/hbench/gen-latgraph -ps ${dir}/lat_mem_rd + fi + done diff --git a/benchmarks/hbench/patches/patch-ad b/benchmarks/hbench/patches/patch-ad new file mode 100644 index 00000000000..3ebda6e14db --- /dev/null +++ b/benchmarks/hbench/patches/patch-ad @@ -0,0 +1,19 @@ +$NetBSD: patch-ad,v 1.1 1998/09/05 22:02:19 garbled Exp $ +--- scripts/create-all-summaries.orig Sat Sep 5 09:15:35 1998 ++++ scripts/create-all-summaries Sat Sep 5 09:16:09 1998 +@@ -31,13 +31,10 @@ + # + # $Id: patch-ad,v 1.1 1998/09/05 22:02:19 garbled Exp $ + +-# Step 1: Discover hbench root path +-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)` +- +-for dir in */* ++for dir in XXXPREFIXXXX/share/hbench/*/* + do + if [ -d $dir ]; then + echo Creating summary for $dir... +- ${HBENCHROOT}/scripts/gen-summary $dir > ${dir}/summary ++ XXXPREFIXXXX/bin/hbench/gen-summary $dir > ${dir}/summary + fi + done diff --git a/benchmarks/hbench/patches/patch-ae b/benchmarks/hbench/patches/patch-ae new file mode 100644 index 00000000000..8989b65dc84 --- /dev/null +++ b/benchmarks/hbench/patches/patch-ae @@ -0,0 +1,151 @@ +$NetBSD: patch-ae,v 1.1 1998/09/05 22:02:19 garbled Exp $ +--- scripts/gen-analysis.orig Sat Sep 5 09:17:12 1998 ++++ scripts/gen-analysis Sat Sep 5 09:19:56 1998 +@@ -47,8 +47,7 @@ + } + + # Step 1: Discover hbench root path +-$HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)`; +-chop($HBENCHROOT); ++$HBENCHROOT="XXXPREFIXXXX/share/hbench"; + + # Some general system information + print "HBench-OS 1.0 Automatic Analysis Output\n"; +@@ -100,7 +99,7 @@ + $stable = 20; + $lastsize = 0.0; + foreach $file (@latencyfiles) { +- $val = `${HBENCHROOT}/scripts/stats-single lat_mem_rd/$file`; ++ $val = `XXXPREFIXXXX/bin/hbench/stats-single lat_mem_rd/$file`; + chop($val); + + if ($val > $threshold*$lastval || $val < $lastval*(2-$threshold)) { +@@ -157,23 +156,23 @@ + } + $drambuf = "4m"; + +-$l1read = `${HBENCHROOT}/scripts/stats-single bw_mem_rd_$l1buf`; ++$l1read = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_rd_$l1buf`; + chop($l1read); +-$l2read = `${HBENCHROOT}/scripts/stats-single bw_mem_rd_$l2buf`; ++$l2read = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_rd_$l2buf`; + chop($l2read); +-$dramread = `${HBENCHROOT}/scripts/stats-single bw_mem_rd_$drambuf`; ++$dramread = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_rd_$drambuf`; + chop($dramread); +-$l1write = `${HBENCHROOT}/scripts/stats-single bw_mem_wr_$l1buf`; ++$l1write = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_wr_$l1buf`; + chop($l1write); +-$l2write = `${HBENCHROOT}/scripts/stats-single bw_mem_wr_$l2buf`; ++$l2write = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_wr_$l2buf`; + chop($l2write); +-$dramwrite = `${HBENCHROOT}/scripts/stats-single bw_mem_wr_$drambuf`; ++$dramwrite = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_wr_$drambuf`; + chop($dramwrite); +-$l1zero = `${HBENCHROOT}/scripts/stats-single bw_bzero_$l1buf`; ++$l1zero = `XXXPREFIXXXX/bin/hbench/stats-single bw_bzero_$l1buf`; + chop($l1zero); +-$l2zero = `${HBENCHROOT}/scripts/stats-single bw_bzero_$l2buf`; ++$l2zero = `XXXPREFIXXXX/bin/hbench/stats-single bw_bzero_$l2buf`; + chop($l2zero); +-$dramzero = `${HBENCHROOT}/scripts/stats-single bw_bzero_$drambuf`; ++$dramzero = `XXXPREFIXXXX/bin/hbench/stats-single bw_bzero_$drambuf`; + chop($dramzero); + + printf (" L1\$ : %.2fMB/sec read, %.2fMB/sec write, %.2f read/write ratio\n", +@@ -217,11 +216,11 @@ + + print "\n * Comparison of Projected and Measured Copy Bandwidths\n"; + print " (projection is one-half the harmonic mean of raw read/write bandwidths)\n"; +-$l1copy = `${HBENCHROOT}/scripts/stats-single bw_mem_cp_${l1buf}_libc_aligned`; ++$l1copy = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_cp_${l1buf}_libc_aligned`; + chop($l1copy); +-$l2copy = `${HBENCHROOT}/scripts/stats-single bw_mem_cp_${l2buf}_libc_aligned`; ++$l2copy = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_cp_${l2buf}_libc_aligned`; + chop($l2copy); +-$dramcopy = `${HBENCHROOT}/scripts/stats-single bw_mem_cp_${drambuf}_libc_aligned`; ++$dramcopy = `XXXPREFIXXXX/bin/hbench/stats-single bw_mem_cp_${drambuf}_libc_aligned`; + chop($dramcopy); + + $l1proj = 1.0/(1.0/$l1read + 1.0/$l1write); +@@ -267,7 +266,7 @@ + $func = $file; + $func =~ s/lat_syscall_//; + +- $val = `${HBENCHROOT}/scripts/stats-single $file`; ++ $val = `XXXPREFIXXXX/bin/hbench/stats-single $file`; + chop($val); + if ($val < $minsyscall) { + $minsyscall2 = $minsyscall; +@@ -279,14 +278,14 @@ + + print " * Approximate \"null\" System Call Time: " . $minsyscall . " us\n"; + print " The system call auto-selected for this case is: ". $syscallname."\n"; +-print " Full statistics: " . `${HBENCHROOT}/scripts/stats-full lat_syscall_$syscallname`; ++print " Full statistics: " . `XXXPREFIXXXX/bin/hbench/stats-full lat_syscall_$syscallname`; + if ($syscallname eq "getpid") { + print " NOTE: the system call selected was getpid, which is frequently\n"; + print " cached at user-level, and thus not a true system call. If\n"; + print " you are unsure whether your system caches getpid, you should\n"; + print " use the following (the second-fastest measured) system call instead:\n"; + print " Time for the ".$syscallname2." system call: " . $minsyscall2 . " us\n"; +- print " Full statistics: " . `${HBENCHROOT}/scripts/stats-full lat_syscall_$syscallname2`; ++ print " Full statistics: " . `XXXPREFIXXXX/bin/hbench/stats-full lat_syscall_$syscallname2`; + } else { + print " NOTE: this may be a cached system call, in which case the result\n"; + print " is not representative of true null system call time.\n"; +@@ -298,12 +297,12 @@ + ## + print " * Process Creation Analysis:\n"; + print " Dynamic processes:\n"; +-$nulld = `${HBENCHROOT}/scripts/stats-single lat_proc_null_dummy`; ++$nulld = `XXXPREFIXXXX/bin/hbench/stats-single lat_proc_null_dummy`; + chop($nulld); + $nulls = $nulld; +-$simpled = `${HBENCHROOT}/scripts/stats-single lat_proc_simple_dynamic`; ++$simpled = `XXXPREFIXXXX/bin/hbench/stats-single lat_proc_simple_dynamic`; + chop($simpled); +-$shd = `${HBENCHROOT}/scripts/stats-single lat_proc_sh_dynamic`; ++$shd = `XXXPREFIXXXX/bin/hbench/stats-single lat_proc_sh_dynamic`; + chop($shd); + $totald = $shd; + $shd -= $simpled; +@@ -316,9 +315,9 @@ + + if ( -f "lat_proc_simple_static" && -f "lat_proc_sh_static" ) { + print " Static processes:\n"; +- $simples = `${HBENCHROOT}/scripts/stats-single lat_proc_simple_static`; ++ $simples = `XXXPREFIXXXX/bin/hbench/stats-single lat_proc_simple_static`; + chop($simples); +- $shs = `${HBENCHROOT}/scripts/stats-single lat_proc_sh_static`; ++ $shs = `XXXPREFIXXXX/bin/hbench/stats-single lat_proc_sh_static`; + chop($shs); + $totals = $shs; + $shs -= $simples; +@@ -340,7 +339,7 @@ + print "\n * Virtual Memory Overhead in Mmap'd Read:\n"; + print " (using $drambuf read to avoid low timer resolution)\n"; + +-$mmaprd = `${HBENCHROOT}/scripts/stats-single bw_mmap_rd_$drambuf`; ++$mmaprd = `XXXPREFIXXXX/bin/hbench/stats-single bw_mmap_rd_$drambuf`; + chop($mmaprd); + $mmapoverhead = 1000000/(256*$mmaprd) - 1000000/(256*$dramread); + printf(" Mmap read bandwidth: %.2fMB/sec; raw HW read bandwidth: %.2fMB/sec\n", +@@ -354,7 +353,7 @@ + ## + print "\n * TCP Network Stack Loopback Copy Overhead:\n"; + +-$tcpbw = `${HBENCHROOT}/scripts/stats-single bw_tcp_1m_localhost`; ++$tcpbw = `XXXPREFIXXXX/bin/hbench/stats-single bw_tcp_1m_localhost`; + chop($tcpbw); + + printf(" TCP bandwidth (1MB buffer via localhost): %.2fMB/sec\n",$tcpbw); +@@ -375,7 +374,7 @@ + ## + print "\n * Pipe-based IPC Copy Overhead:\n"; + +-$pipebw = `${HBENCHROOT}/scripts/stats-single bw_pipe_$drambuf`; ++$pipebw = `XXXPREFIXXXX/bin/hbench/stats-single bw_pipe_$drambuf`; + chop($pipebw); + + printf(" Pipe bandwidth ($drambuf transfer): %.2fMB/sec\n",$pipebw); diff --git a/benchmarks/hbench/patches/patch-af b/benchmarks/hbench/patches/patch-af new file mode 100644 index 00000000000..2a53e0521a1 --- /dev/null +++ b/benchmarks/hbench/patches/patch-af @@ -0,0 +1,22 @@ +$NetBSD: patch-af,v 1.1 1998/09/05 22:02:20 garbled Exp $ +--- scripts/gen-latgraph.orig Sat Sep 5 09:20:49 1998 ++++ scripts/gen-latgraph Sat Sep 5 09:22:07 1998 +@@ -63,9 +63,6 @@ + ECHON= ; ECHOC='\c' + fi + +-# Step 1: Discover hbench root path +-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)` +- + # Step 2: Extract the parameters from each filename and get the data + # from the file, then put into the output file in proper format. + STRIDES=`ls rd_* | sed 's/rd_[0-9]*_//g' | sort -n -r | uniq` +@@ -83,7 +80,7 @@ + do + size=`echo $file |sed "s/^rd_//" | sed "s/_.*$//"` + size=`echo $size | awk '{print $1/1024;}'` +- VAL=`${HBENCHROOT}/scripts/stats-single $file` ++ VAL=`XXXPREFIXXXX/bin/hbench/stats-single $file` + if [ `echo "$VAL $YMAX" | awk '{print ($1 > $2);}'` -gt 0 ]; then + YMAX=$VAL + fi diff --git a/benchmarks/hbench/patches/patch-ag b/benchmarks/hbench/patches/patch-ag new file mode 100644 index 00000000000..b99c94394aa --- /dev/null +++ b/benchmarks/hbench/patches/patch-ag @@ -0,0 +1,31 @@ +$NetBSD: patch-ag,v 1.1 1998/09/05 22:02:20 garbled Exp $ +--- scripts/gen-summary.orig Sat Sep 5 09:23:30 1998 ++++ scripts/gen-summary Sat Sep 5 09:24:09 1998 +@@ -45,9 +45,6 @@ + exit 1 + fi + +-# Step 1: Discover hbench root path +-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)` +- + # Some general system information + echo "HBench-OS 1.0 Summary Output" + echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-" +@@ -60,7 +57,7 @@ + do + echo "${benchmark}:" + FILES="${benchmark}_* ${benchmark}" +- FILES=`echo ${FILES} | ${HBENCHROOT}/scripts/argsort` ++ FILES=`echo ${FILES} | XXXPREFIXXXX/bin/hbench/argsort` + for file in $FILES + do + if [ -f $file ]; then +@@ -70,7 +67,7 @@ + fi + PARAMS="${PARAMS}: " + +- echo " ${PARAMS}`${HBENCHROOT}/scripts/stats-full $file 2>&1`" ++ echo " ${PARAMS}`XXXPREFIXXXX/bin/hbench/stats-full $file 2>&1`" + fi + done + echo diff --git a/benchmarks/hbench/patches/patch-ah b/benchmarks/hbench/patches/patch-ah new file mode 100644 index 00000000000..8a846c6bb1a --- /dev/null +++ b/benchmarks/hbench/patches/patch-ah @@ -0,0 +1,76 @@ +$NetBSD: patch-ah,v 1.1 1998/09/05 22:02:20 garbled Exp $ +--- scripts/maindriver.orig Sat Sep 5 09:24:50 1998 ++++ scripts/maindriver Sat Sep 5 09:28:52 1998 +@@ -48,9 +48,6 @@ + fi + + +-# Step 1: Discover hbench root path +-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)` +- + # Step 2: Get run file name, check arguments, etc + if [ $# -lt 1 ]; then + echo "Usage: `basename $0` <run_file>" +@@ -94,16 +91,16 @@ + fi + + if [ X${PLAINBINDIR}X = XX ]; then +- PLAINBINDIR=${HBENCHROOT}/bin/${OSTYPE}-${ARCH} ++ PLAINBINDIR=XXXPREFIXXXX/bin/hbench/${OSTYPE}-${ARCH} + fi + if [ X${CYCLECOUNTERBINDIR}X = XX ]; then +- CYCLECOUNTERBINDIR=${HBENCHROOT}/bin/${OSTYPE}-${ARCH}-c ++ CYCLECOUNTERBINDIR=XXXPREFIXXXX/bin/hbench/${OSTYPE}-${ARCH}-c + fi + if [ X${EVENTCOUNTERBINDIR}X = XX ]; then +- EVENTCOUNTERBINDIR=${HBENCHROOT}/bin/${OSTYPE}-${ARCH}-ec ++ EVENTCOUNTERBINDIR=XXXPREFIXXXX/bin/hbench/${OSTYPE}-${ARCH}-ec + fi + if [ X${RESULTDIRBASE}X = XX ]; then +- RESULTDIRBASE=${HBENCHROOT}/Results/${OSTYPE}-${ARCH} ++ RESULTDIRBASE=XXXPREFIXXXX/share/hbench/Results/${OSTYPE}-${ARCH} + fi + + RESULTDIRB=${RESULTDIRBASE}/${SYSTEMNAME} +@@ -120,10 +117,10 @@ + TESTS=${TESTFILE} + elif [ -f ${TESTFILE}.test ]; then + TESTS=${TESTFILE}.test +-elif [ -f ${HBENCHROOT}/conf/${TESTFILE} ]; then +- TESTS=${HBENCHROOT}/conf/${TESTFILE} +-elif [ -f ${HBENCHROOT}/conf/${TESTFILE}.test ]; then +- TESTS=${HBENCHROOT}/conf/${TESTFILE}.test ++elif [ -f XXXPREFIXXXX/share/hbench/conf/${TESTFILE} ]; then ++ TESTS=XXXPREFIXXXX/share/hbench/conf/${TESTFILE} ++elif [ -f XXXPREFIXXXX/share/hbench/conf/${TESTFILE}.test ]; then ++ TESTS=XXXPREFIXXXX/share/hbench/conf/${TESTFILE}.test + else + echo "Unable to locate test file ${TESTFILE}." + echo "Fix run file $1 and retry" +@@ -427,9 +424,9 @@ + ;; + esac + else +- ${RCP} ${HBENCHROOT}/scripts/config.guess ${machine}:/tmp/get-os ++ ${RCP} XXXPREFIXXXX/bin/hbench/config.guess ${machine}:/tmp/get-os + REMOTEOS=`$RSH $machine -n /tmp/get-os | sed 's/^.*-.*-//` +- ${RCP} ${HBENCHROOT}/bin/${REMOTEOS}/$1 ${machine}:/tmp ++ ${RCP} XXXPREFIXXXX/bin/hbench/${REMOTEOS}/$1 ${machine}:/tmp + + $RSH $machine -n /tmp/$1 0 $3 -s 2>> $STDERR & + fi +@@ -788,12 +785,12 @@ + if [ X`perl -e 'print "perltest\n";' 2>&1`X = XperltestX ]; then + echo $ECHON "Generating summary information...${ECHOC}" + rm -f ${RESULTDIR}/summary +- ${HBENCHROOT}/scripts/gen-summary ${RESULTDIR} > ${RESULTDIR}/summary ++ XXXPREFIXXXX/bin/hbench/gen-summary ${RESULTDIR} > ${RESULTDIR}/summary + echo "done." + + echo $ECHON "Performing basic automated data analysis...${ECHOC}" + rm -f ${RESULTDIR}/analysis +- ${HBENCHROOT}/scripts/gen-analysis ${RESULTDIR} > ${RESULTDIR}/analysis ++ XXXPREFIXXXX/bin/hbench/gen-analysis ${RESULTDIR} > ${RESULTDIR}/analysis + echo "done." + + if [ `cat $RESULTDIR/errors | wc -l` -gt 0 ]; then diff --git a/benchmarks/hbench/patches/patch-ai b/benchmarks/hbench/patches/patch-ai new file mode 100644 index 00000000000..c42384d1fa2 --- /dev/null +++ b/benchmarks/hbench/patches/patch-ai @@ -0,0 +1,28 @@ +$NetBSD: patch-ai,v 1.1 1998/09/05 22:02:20 garbled Exp $ +--- Results/Makefile.orig Sat Sep 5 09:35:16 1998 ++++ Results/Makefile Sat Sep 5 09:36:22 1998 +@@ -41,8 +41,8 @@ + # RESULTS! USE WITH CARE! + + SHELL=/bin/sh +-ARCH=`$(SHELL) ../scripts/config.guess | sed 's/-.*-.*$$//'` +-OS=`$(SHELL) ../scripts/config.guess | sed 's/^.*-.*-//'` ++ARCH=`$(SHELL) XXXPREFIXXXX/bin/hbench/config.guess | sed 's/-.*-.*$$//'` ++OS=`$(SHELL) XXXPREFIXXXX/bin/hbench/config.guess | sed 's/^.*-.*-//'` + + default: + @echo "Select one of the following targets:" +@@ -78,10 +78,10 @@ + @echo "a graph of the memory hierarchy latency for a given machine." + + summaries: +- $(SHELL) ../scripts/create-all-summaries ++ $(SHELL) XXXPREFIXXXX/bin/hbench/create-all-summaries + + analyses: +- $(SHELL) ../scripts/create-all-analyses ++ $(SHELL) XXXPREFIXXXX/bin/hbench/create-all-analyses + + latencygraphs: +- $(SHELL) ../scripts/create-all-latgraphs ++ $(SHELL) XXXPREFIXXXX/bin/hbench/create-all-latgraphs diff --git a/benchmarks/hbench/patches/patch-aj b/benchmarks/hbench/patches/patch-aj new file mode 100644 index 00000000000..71ed3fb30b0 --- /dev/null +++ b/benchmarks/hbench/patches/patch-aj @@ -0,0 +1,16 @@ +$NetBSD: patch-aj,v 1.1 1998/09/05 22:02:20 garbled Exp $ +--- scripts/stats-full.orig Sat Sep 5 11:56:46 1998 ++++ scripts/stats-full Sat Sep 5 11:57:38 1998 +@@ -85,10 +85,10 @@ + $sum += @vals[$i]; + $sumsq += @vals[$i]*@vals[$i]; + } +- ++# XXX count -1 ??? + $count -= 2*$tailsize; + $avg = $sum/$count; +-$std = (1/($count - 1)) * ($sumsq - 2*$avg*$sum + $count*$avg*$avg); ++$std = (1/($count)) * ($sumsq - 2*$avg*$sum + $count*$avg*$avg); + $std = sqrt($std); + + printf("%f (std. %f, %.2f%%) [median %f]\n",$avg,$std,100*$std/$avg,$median); diff --git a/benchmarks/hbench/pkg/COMMENT b/benchmarks/hbench/pkg/COMMENT new file mode 100644 index 00000000000..174969d4b1b --- /dev/null +++ b/benchmarks/hbench/pkg/COMMENT @@ -0,0 +1 @@ +a suite of portable benchmarks to measure the OS and the hardware. diff --git a/benchmarks/hbench/pkg/DESCR b/benchmarks/hbench/pkg/DESCR new file mode 100644 index 00000000000..fe0863bc1e4 --- /dev/null +++ b/benchmarks/hbench/pkg/DESCR @@ -0,0 +1,9 @@ +HBench-OS is a suite of portable benchmarks designed to measure the +performance of primitive functionality provided by an operating +system/hardware platform. HBench-OS was designed primarily as a +research tool for the systems research and OS development communities, +and thus its major design goal is to provide a flexible system for +reproducible, accurate, and statistically-sound performance analysis +and evaluation. These characteristics make it ideal for both +performance research as well as more traditional consumer-oriented +performance measurement and analysis. diff --git a/benchmarks/hbench/pkg/MESSAGE b/benchmarks/hbench/pkg/MESSAGE new file mode 100644 index 00000000000..8aa06c3fa30 --- /dev/null +++ b/benchmarks/hbench/pkg/MESSAGE @@ -0,0 +1,3 @@ +execute "run-hbench" to run the benchmark. +There is a Makefile in your share/hbench/Results directory +that can be used to format and summarize your results as well. diff --git a/benchmarks/hbench/pkg/PLIST.common b/benchmarks/hbench/pkg/PLIST.common new file mode 100644 index 00000000000..ee1d9fe6466 --- /dev/null +++ b/benchmarks/hbench/pkg/PLIST.common @@ -0,0 +1,27 @@ +@comment $NetBSD: PLIST.common,v 1.1 1998/09/05 22:02:21 garbled Exp $ +bin/hbench/argsort +bin/hbench/config.guess +bin/hbench/config.sub +bin/hbench/create-all-analyses +bin/hbench/create-all-latgraphs +bin/hbench/create-all-summaries +bin/hbench/depend +bin/hbench/gen-analysis +bin/hbench/gen-latgraph +bin/hbench/gen-summary +bin/hbench/getostype +bin/hbench/interactive-setup +bin/hbench/maindriver +bin/hbench/stats-full +bin/hbench/stats-single +bin/run-hbench +share/doc/hbench/README +share/doc/hbench/benchmark-descriptions +share/doc/hbench/interpreting-results +share/doc/hbench/sigmetrics97-paper.ps.gz +share/doc/hbench/using-hbench +share/hbench/Results/Makefile +share/hbench/conf/full.test +share/hbench/conf/sample.run +@dirrm bin/hbench +@dirrm share/doc/hbench diff --git a/benchmarks/hbench/pkg/PLIST.i386 b/benchmarks/hbench/pkg/PLIST.i386 new file mode 100644 index 00000000000..e1485b06a37 --- /dev/null +++ b/benchmarks/hbench/pkg/PLIST.i386 @@ -0,0 +1,29 @@ +@comment $NetBSD: PLIST.i386,v 1.1 1998/09/05 22:02:21 garbled Exp $ +bin/hbench/XXXNETBSDVERXXX-c/bw_bzero +bin/hbench/XXXNETBSDVERXXX-c/bw_file_rd +bin/hbench/XXXNETBSDVERXXX-c/bw_mem_cp +bin/hbench/XXXNETBSDVERXXX-c/bw_mem_rd +bin/hbench/XXXNETBSDVERXXX-c/bw_mem_wr +bin/hbench/XXXNETBSDVERXXX-c/bw_mmap_rd +bin/hbench/XXXNETBSDVERXXX-c/bw_pipe +bin/hbench/XXXNETBSDVERXXX-c/bw_tcp +bin/hbench/XXXNETBSDVERXXX-c/hello +bin/hbench/XXXNETBSDVERXXX-c/hello-s +bin/hbench/XXXNETBSDVERXXX-c/lat_connect +bin/hbench/XXXNETBSDVERXXX-c/lat_ctx +bin/hbench/XXXNETBSDVERXXX-c/lat_ctx2 +bin/hbench/XXXNETBSDVERXXX-c/lat_fs +bin/hbench/XXXNETBSDVERXXX-c/lat_fslayer +bin/hbench/XXXNETBSDVERXXX-c/lat_mem_rd +bin/hbench/XXXNETBSDVERXXX-c/lat_mmap +bin/hbench/XXXNETBSDVERXXX-c/lat_pipe +bin/hbench/XXXNETBSDVERXXX-c/lat_proc +bin/hbench/XXXNETBSDVERXXX-c/lat_rpc +bin/hbench/XXXNETBSDVERXXX-c/lat_sig +bin/hbench/XXXNETBSDVERXXX-c/lat_syscall +bin/hbench/XXXNETBSDVERXXX-c/lat_tcp +bin/hbench/XXXNETBSDVERXXX-c/lat_udp +bin/hbench/XXXNETBSDVERXXX-c/memsize +bin/hbench/XXXNETBSDVERXXX-c/mhz +bin/hbench/XXXNETBSDVERXXX-c/mhz-counter +@dirrm bin/hbench/XXXNETBSDVERXXX-c diff --git a/benchmarks/hbench/pkg/PLIST.md b/benchmarks/hbench/pkg/PLIST.md new file mode 100644 index 00000000000..0c8ae8d2c43 --- /dev/null +++ b/benchmarks/hbench/pkg/PLIST.md @@ -0,0 +1,28 @@ +@comment $NetBSD: PLIST.md,v 1.1 1998/09/05 22:02:21 garbled Exp $ +bin/hbench/XXXNETBSDVERXXX/bw_bzero +bin/hbench/XXXNETBSDVERXXX/bw_file_rd +bin/hbench/XXXNETBSDVERXXX/bw_mem_cp +bin/hbench/XXXNETBSDVERXXX/bw_mem_rd +bin/hbench/XXXNETBSDVERXXX/bw_mem_wr +bin/hbench/XXXNETBSDVERXXX/bw_mmap_rd +bin/hbench/XXXNETBSDVERXXX/bw_pipe +bin/hbench/XXXNETBSDVERXXX/bw_tcp +bin/hbench/XXXNETBSDVERXXX/hello +bin/hbench/XXXNETBSDVERXXX/hello-s +bin/hbench/XXXNETBSDVERXXX/lat_connect +bin/hbench/XXXNETBSDVERXXX/lat_ctx +bin/hbench/XXXNETBSDVERXXX/lat_ctx2 +bin/hbench/XXXNETBSDVERXXX/lat_fs +bin/hbench/XXXNETBSDVERXXX/lat_fslayer +bin/hbench/XXXNETBSDVERXXX/lat_mem_rd +bin/hbench/XXXNETBSDVERXXX/lat_mmap +bin/hbench/XXXNETBSDVERXXX/lat_pipe +bin/hbench/XXXNETBSDVERXXX/lat_proc +bin/hbench/XXXNETBSDVERXXX/lat_rpc +bin/hbench/XXXNETBSDVERXXX/lat_sig +bin/hbench/XXXNETBSDVERXXX/lat_syscall +bin/hbench/XXXNETBSDVERXXX/lat_tcp +bin/hbench/XXXNETBSDVERXXX/lat_udp +bin/hbench/XXXNETBSDVERXXX/memsize +bin/hbench/XXXNETBSDVERXXX/mhz +@dirrm bin/hbench/XXXNETBSDVERXXX diff --git a/benchmarks/hbench/scripts/do-install b/benchmarks/hbench/scripts/do-install new file mode 100755 index 00000000000..9ef753dafad --- /dev/null +++ b/benchmarks/hbench/scripts/do-install @@ -0,0 +1,34 @@ +#!/bin/sh + +cd $WRKSRC +DIRS=`ls -d bin/*` +SCRIPTS="argsort config.guess config.sub create-all-analyses create-all-latgraphs create-all-summaries depend gen-analysis gen-latgraph gen-summary getostype interactive-setup maindriver stats-full stats-single" +DOCS="README benchmark-descriptions interpreting-results sigmetrics97-paper.ps.gz using-hbench" + +mkdir -p $PREFIX/bin/hbench +mkdir -p $PREFIX/share/hbench + +for basedir in $DIRS; do + OSDIR=`basename $basedir` + mkdir -p $PREFIX/bin/hbench/$OSDIR + /usr/bin/install -c -s -o bin -g bin -m 0755 bin/$OSDIR/* $PREFIX/bin/hbench/$OSDIR +done + +for files in $SCRIPTS; do + /usr/bin/install -c -o bin -g bin -m 0755 scripts/$files $PREFIX/bin/hbench +done +mkdir -p $PREFIX/share/doc/hbench +for files in $DOCS; do + /usr/bin/install -c -o bin -g bin -m 0444 doc/$files $PREFIX/share/doc/hbench +done +cat <<EOF >$PREFIX/bin/run-hbench +#!/bin/sh +${PREFIX}/bin/hbench/interactive-setup +${PREFIX}/bin/hbench/maindriver ${PREFIX}/share/hbench/conf/`hostname`.run +EOF +chown bin:bin ${PREFIX}/bin/run-hbench +chmod 0755 ${PREFIX}/bin/run-hbench +cp -R Results $PREFIX/share/hbench +rm $PREFIX/share/hbench/Results/Makefile.orig +cp -R conf $PREFIX/share/hbench + |