summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-09-24 08:45:00 +0000
committeragc <agc@pkgsrc.org>1998-09-24 08:45:00 +0000
commit3beed9d9c6ba51d83667921c2bdfe55e594406f9 (patch)
tree69d55c8a3309d08b1d34659eeda0e474006d853f /benchmarks
parentf0ce95d898151713eae8525e9c607850b214aa41 (diff)
downloadpkgsrc-3beed9d9c6ba51d83667921c2bdfe55e594406f9.tar.gz
+ Use @PREFIX@ as the pattern to substitute for ${PREFIX}
+ Cleanup the substitutions a bit. + Add a benchmark target to the package Makefile to enable the benchmark to be run.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/lmbench/Makefile22
-rw-r--r--benchmarks/lmbench/patches/patch-af40
-rw-r--r--benchmarks/lmbench/patches/patch-ag10
-rw-r--r--benchmarks/lmbench/patches/patch-ah20
-rw-r--r--benchmarks/lmbench/patches/patch-ai24
-rw-r--r--benchmarks/lmbench/patches/patch-aj4
6 files changed, 59 insertions, 61 deletions
diff --git a/benchmarks/lmbench/Makefile b/benchmarks/lmbench/Makefile
index 5ee582985b9..57f4f2af012 100644
--- a/benchmarks/lmbench/Makefile
+++ b/benchmarks/lmbench/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 1998/08/30 17:46:25 garbled Exp $
+# $NetBSD: Makefile,v 1.2 1998/09/24 08:45:00 agc Exp $
DISTNAME= lmbench-2alpha11
PKGNAME= lmbench-2.11a
@@ -14,17 +14,12 @@ USE_GMAKE= yes
USE_PERL5= yes
post-configure:
- @${MV} ${WRKSRC}/scripts/os foo
- ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/os
- @${MV} ${WRKSRC}/scripts/results foo
- ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/results
- @${MV} ${WRKSRC}/scripts/config-run foo
- ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/config-run
- @${MV} ${WRKSRC}/scripts/lmbench foo
- ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/scripts/lmbench
- @${MV} ${WRKSRC}/results/Makefile foo
- ${SED} -e 's@XXXPREFIXXXX@${PREFIX}@g' < foo > ${WRKSRC}/results/Makefile
- @${RM} -f foo
+ @cd ${WRKSRC}; \
+ for f in scripts/os scripts/results scripts/config-run \
+ scripts/lmbench results/Makefile; do \
+ ${MV} $$f $$f.in; \
+ ${SED} -e 's|@PREFIX@|${PREFIX}|g' $$f.in > $$f; \
+ done
@chmod 0755 ${WRKSRC}/scripts/config-run
@chmod 0755 ${WRKSRC}/scripts/os
@chmod 0755 ${WRKSRC}/scripts/results
@@ -33,4 +28,7 @@ post-configure:
do-install:
@${SETENV} PREFIX=${PREFIX} WRKSRC=${WRKSRC} ${SCRIPTDIR}/do-install
+benchmark:
+ @cd ${WRKSRC}/src; ${GMAKE} results
+
.include "../../mk/bsd.pkg.mk"
diff --git a/benchmarks/lmbench/patches/patch-af b/benchmarks/lmbench/patches/patch-af
index b0c6f103201..ca7fffca509 100644
--- a/benchmarks/lmbench/patches/patch-af
+++ b/benchmarks/lmbench/patches/patch-af
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
+$NetBSD: patch-af,v 1.2 1998/09/24 08:45:00 agc Exp $
--- scripts/config-run.orig Fri Jul 31 12:55:19 1998
+++ scripts/config-run Sun Aug 30 08:08:52 1998
@@ -3,7 +3,7 @@
@@ -6,7 +6,7 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
# 1.23 98/07/31 lm@lm.bitmover.com
-OS=`../scripts/os`
-+OS=`XXXPREFIXXXX/bin/lmbench/os`
++OS=`@PREFIX@/bin/lmbench/os`
L='====================================================================='
echo $L;
cat<<EOF;
@@ -16,24 +16,24 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
echo "Hang on, we are calculating your timing granularity."
-../bin/$OS/msleep 250
-ENOUGH=`../bin/$OS/enough`
-+XXXPREFIXXXX/bin/lmbench/msleep 250
-+ENOUGH=`XXXPREFIXXXX/bin/lmbench/enough`
++@PREFIX@/bin/lmbench/msleep 250
++ENOUGH=`@PREFIX@/bin/lmbench/enough`
export ENOUGH
echo "OK, it looks like you can time stuff down to $ENOUGH usec resolution."
echo ""
echo "Hang on, we are calculating your timing overhead."
-../bin/$OS/msleep 250
-TIMING_O=`../bin/$OS/timing_o`
-+XXXPREFIXXXX/bin/lmbench/msleep 250
-+TIMING_O=`XXXPREFIXXXX/bin/lmbench/timing_o`
++@PREFIX@/bin/lmbench/msleep 250
++TIMING_O=`@PREFIX@/bin/lmbench/timing_o`
export TIMING_O
echo "OK, it looks like your gettimeofday() costs $TIMING_O usecs."
echo ""
echo "Hang on, we are calculating your loop overhead."
-../bin/$OS/msleep 250
-LOOP_O=`../bin/$OS/loop_o`
-+XXXPREFIXXXX/bin/lmbench/msleep 250
-+LOOP_O=`XXXPREFIXXXX/bin/lmbench/loop_o`
++@PREFIX@/bin/lmbench/msleep 250
++LOOP_O=`@PREFIX@/bin/lmbench/loop_o`
export LOOP_O
echo "OK, it looks like your benchmark loop costs $LOOP_O usecs."
echo ""
@@ -44,9 +44,9 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
-AVAILMEM=`../bin/$OS/memsize $MB`
-AVAILMEM=`../bin/$OS/memsize $MB`
-AVAILMEM=`../bin/$OS/memsize $MB`
-+AVAILMEM=`XXXPREFIXXXX/bin/lmbench/memsize $MB`
-+AVAILMEM=`XXXPREFIXXXX/bin/lmbench/memsize $MB`
-+AVAILMEM=`XXXPREFIXXXX/bin/lmbench/memsize $MB`
++AVAILMEM=`@PREFIX@/bin/lmbench/memsize $MB`
++AVAILMEM=`@PREFIX@/bin/lmbench/memsize $MB`
++AVAILMEM=`@PREFIX@/bin/lmbench/memsize $MB`
if [ $AVAILMEM -lt 8 ]
then echo $0 aborted: Not enough memory, only ${AVAILMEM}MB available.
exit 1
@@ -55,7 +55,7 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
for i in $disks
do if [ -r $i ]
- then ../bin/$OS/flushdisk $i
-+ then XXXPREFIXXXX/bin/lmbench/flushdisk $i
++ then @PREFIX@/bin/lmbench/flushdisk $i
if [ $? -eq 1 ]
then echo "Must be root to run disk benchmarks."
echo "Root is needed to flush the buffer cache"
@@ -64,7 +64,7 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
echo ""
echo "Calculating mhz, please wait for a moment..."
-MHZ=`../bin/$OS/mhz`
-+MHZ=`XXXPREFIXXXX/bin/lmbench/mhz`
++MHZ=`@PREFIX@/bin/lmbench/mhz`
cat > /dev/tty <<EOF
I think your CPU mhz is
@@ -73,14 +73,14 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
esac
-INFO=`../scripts/info`
-+INFO=`XXXPREFIXXXX/bin/lmbench/info`
++INFO=`@PREFIX@/bin/lmbench/info`
if [ $MAIL = yes ]
-then if [ ! -f ../bin/$OS/$INFO ]
- then cp ../scripts/info-template ../bin/$OS/$INFO
- chmod +w ../bin/$OS/$INFO
+then if [ ! -f $INFO ]
-+ then cp XXXPREFIXXXX/bin/lmbench/info-template XXXPREFIXXXX/share/lmbench/$INFO
-+ chmod +w XXXPREFIXXXX/share/lmbench/$INFO
++ then cp @PREFIX@/bin/lmbench/info-template @PREFIX@/share/lmbench/$INFO
++ chmod +w @PREFIX@/share/lmbench/$INFO
REUSE=no
else
REUSE=view
@@ -89,7 +89,7 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
[Vv]*) REUSE=view
echo $L
- more ../bin/$OS/$INFO
-+ more XXXPREFIXXXX/share/lmbench/$INFO
++ more @PREFIX@/share/lmbench/$INFO
echo $L
;;
*) REUSE=yes
@@ -98,7 +98,7 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
fi
if [ X$EDITOR != "none" ]
- then $EDITOR ../bin/$OS/`../scripts/info`
-+ then $EDITOR XXXPREFIXXXX/share/lmbench/`XXXPREFIXXXX/share/lmbench/info`
++ then $EDITOR @PREFIX@/share/lmbench/`@PREFIX@/share/lmbench/info`
fi
fi
fi
@@ -107,8 +107,8 @@ $NetBSD: patch-af,v 1.1 1998/08/30 17:46:26 garbled Exp $
EOF
-VERSION=`../scripts/version`
-+VERSION=`XXXPREFIXXXX/bin/lmbench/version`
-+CONFIG=XXXPREFIXXXX/share/lmbench/`XXXPREFIXXXX/bin/lmbench/config`
++VERSION=`@PREFIX@/bin/lmbench/version`
++CONFIG=@PREFIX@/share/lmbench/`@PREFIX@/bin/lmbench/config`
-cat<<EOF > ../bin/$OS/`../scripts/config`
+cat <<EOF >$CONFIG
diff --git a/benchmarks/lmbench/patches/patch-ag b/benchmarks/lmbench/patches/patch-ag
index 3bd09b7dac9..08719e79172 100644
--- a/benchmarks/lmbench/patches/patch-ag
+++ b/benchmarks/lmbench/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.1 1998/08/30 17:46:26 garbled Exp $
+$NetBSD: patch-ag,v 1.2 1998/09/24 08:45:00 agc Exp $
--- scripts/os.orig Sun Aug 30 05:38:55 1998
+++ scripts/os Sun Aug 30 05:40:06 1998
@@ -1,10 +1,10 @@
@@ -7,12 +7,12 @@ $NetBSD: patch-ag,v 1.1 1998/08/30 17:46:26 garbled Exp $
OS=bloat-os
-if [ -f ../scripts/gnu-os ]
-then OS=`../scripts/gnu-os | sed s/unknown-//`
-+if [ -f XXXPREFIXXXX/bin/lmbench/gnu-os ]
-+then OS=`XXXPREFIXXXX/bin/lmbench/gnu-os | sed s/unknown-//`
++if [ -f @PREFIX@/bin/lmbench/gnu-os ]
++then OS=`@PREFIX@/bin/lmbench/gnu-os | sed s/unknown-//`
fi
-if [ -f ../../scripts/gnu-os ]
-then OS=`../../scripts/gnu-os | sed s/unknown-//`
-+if [ -f XXXPREFIXXXX/bin/lmbench/gnu-os ]
-+then OS=`XXXPREFIXXXX/bin/lmbench/gnu-os | sed s/unknown-//`
++if [ -f @PREFIX@/bin/lmbench/gnu-os ]
++then OS=`@PREFIX@/bin/lmbench/gnu-os | sed s/unknown-//`
fi
echo $OS
diff --git a/benchmarks/lmbench/patches/patch-ah b/benchmarks/lmbench/patches/patch-ah
index 6f25535b281..255ffa9e11c 100644
--- a/benchmarks/lmbench/patches/patch-ah
+++ b/benchmarks/lmbench/patches/patch-ah
@@ -1,27 +1,27 @@
-$NetBSD: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $
+$NetBSD: patch-ah,v 1.2 1998/09/24 08:45:00 agc Exp $
--- scripts/results.orig Fri Jul 31 12:55:19 1998
+++ scripts/results Sun Aug 30 08:42:03 1998
@@ -2,20 +2,20 @@
- # $Id: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $
+ # $Id: patch-ah,v 1.2 1998/09/24 08:45:00 agc Exp $
-OS=`../scripts/os`
-CONFIG=`../scripts/config`
-RESULTS=results/$OS
-BASE=../$RESULTS/`uname -n`
-+OS=`XXXPREFIXXXX/bin/lmbench/os`
-+CONFIG=`XXXPREFIXXXX/bin/lmbench/config`
-+RESULTS=XXXPREFIXXXX/share/lmbench/results/$OS
++OS=`@PREFIX@/bin/lmbench/os`
++CONFIG=`@PREFIX@/bin/lmbench/config`
++RESULTS=@PREFIX@/share/lmbench/results/$OS
+BASE=$RESULTS/`uname -n`
EXT=0
-if [ ! -f "../bin/$OS/$CONFIG" ]
-+if [ ! -f "XXXPREFIXXXX/share/lmbench/$CONFIG" ]
++if [ ! -f "@PREFIX@/share/lmbench/$CONFIG" ]
then echo "No config file?"
exit 1
fi
-. ../bin/$OS/$CONFIG
-+. XXXPREFIXXXX/share/lmbench/$CONFIG
++. @PREFIX@/share/lmbench/$CONFIG
-if [ ! -d ../$RESULTS ]
-then mkdir -p ../$RESULTS
@@ -35,14 +35,14 @@ $NetBSD: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $
done
-cd ../bin/$OS
-+cd XXXPREFIXXXX/share/lmbench/results/$OS
++cd @PREFIX@/share/lmbench/results/$OS
if [ "X$SYNC_MAX" = X ]; then echo "No SYNC_MAX variable."; exit 1; fi
if [ $SYNC_MAX -gt 1 ]
then SYNC_PID=1; export SYNC_PID
while [ $SYNC_PID -le $SYNC_MAX ]
do echo Results $SYNC_PID going to ${RESULTS}.$SYNC_PID
- ../../scripts/lmbench $CONFIG 2>../${RESULTS}.$SYNC_PID &
-+ XXXPREFIXXXX/bin/lmbench/lmbench XXXPREFIXXXX/share/lmbench/$CONFIG 2>${RESULTS}.$SYNC_PID &
++ @PREFIX@/bin/lmbench/lmbench @PREFIX@/share/lmbench/$CONFIG 2>${RESULTS}.$SYNC_PID &
SYNC_PID=`expr $SYNC_PID + 1`
done; wait
else echo Results going to ${RESULTS}
@@ -50,7 +50,7 @@ $NetBSD: patch-ah,v 1.1 1998/08/30 17:46:27 garbled Exp $
SYNC_MAX=1
export SYNC_PID SYNC_MAX
- ../../scripts/lmbench $CONFIG 2>../${RESULTS}
-+ XXXPREFIXXXX/bin/lmbench/lmbench XXXPREFIXXXX/share/lmbench/$CONFIG 2>${RESULTS}
++ @PREFIX@/bin/lmbench/lmbench @PREFIX@/share/lmbench/$CONFIG 2>${RESULTS}
fi
if [ X$MAIL = Xyes ]
diff --git a/benchmarks/lmbench/patches/patch-ai b/benchmarks/lmbench/patches/patch-ai
index 2d5d35a2d2b..1f87e5609a8 100644
--- a/benchmarks/lmbench/patches/patch-ai
+++ b/benchmarks/lmbench/patches/patch-ai
@@ -1,12 +1,12 @@
-$NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
+$NetBSD: patch-ai,v 1.2 1998/09/24 08:45:00 agc Exp $
--- scripts/lmbench.orig Fri Jul 31 12:55:19 1998
+++ scripts/lmbench Sun Aug 30 09:05:29 1998
@@ -7,7 +7,7 @@
- # $Id: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
+ # $Id: patch-ai,v 1.2 1998/09/24 08:45:00 agc Exp $
# Make sure we can find: ./cmd, df, and netstat
-PATH=.:../../scripts:$PATH:/etc:/usr/etc:/sbin:/usr/sbin
-+PATH=.:XXXPREFIXXXX/bin/lmbench:$PATH:/etc:/usr/etc:/sbin:/usr/sbin
++PATH=.:@PREFIX@/bin/lmbench:$PATH:/etc:/usr/etc:/sbin:/usr/sbin
export PATH
if [ -f $1 ]
@@ -15,10 +15,10 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
lat_unix
if [ $MP = Y ]
-then if [ $SYNC_MAX = $SYNC_PID ]; then cp hello /tmp/hello; fi
-+then if [ $SYNC_MAX = $SYNC_PID ]; then cp XXXPREFIXXXX/bin/lmbench/hello /tmp/hello; fi
++then if [ $SYNC_MAX = $SYNC_PID ]; then cp @PREFIX@/bin/lmbench/hello /tmp/hello; fi
synchronize $SYNC/lat_proc
-else cp hello /tmp/hello
-+else cp XXXPREFIXXXX/bin/lmbench/hello /tmp/hello
++else cp @PREFIX@/bin/lmbench/hello /tmp/hello
fi
lat_proc fork
lat_proc exec
@@ -27,7 +27,7 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
then date > /dev/tty
echo Local networking > /dev/tty
- if [ ! -d ../../src/webpage-lm ]
-+ if [ ! -d XXXPREFIXXXX/share/lmbench/webpage-lm ]
++ if [ ! -d @PREFIX@/share/lmbench/webpage-lm ]
then (cd ../../src && tar xf webpage-lm.tar)
sync
sleep 1
@@ -35,7 +35,7 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
SERVERS="lat_udp lat_tcp lat_rpc lat_connect bw_tcp"
for server in $SERVERS; do $server -s; done
- DOCROOT=../../src/webpage-lm lmhttp 8008 &
-+ DOCROOT=XXXPREFIXXXX/share/lmbench/webpage-lm lmhttp 8008 &
++ DOCROOT=@PREFIX@/share/lmbench/webpage-lm lmhttp 8008 &
sleep 2;
for i in localhost
do
@@ -45,15 +45,15 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
# I want a hot cache number
- lat_http $i 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1
- lat_http $i 8008 < ../../src/webpage-lm/URLS
-+ lat_http $i 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS > /dev/null 2>&1
-+ lat_http $i 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS
++ lat_http $i 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS > /dev/null 2>&1
++ lat_http $i 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS
lat_http -$i 8008
done
for remote in $REMOTE
do echo Networking to $remote > /dev/tty
- rcp $SERVERS lmhttp ../../src/webpage-lm.tar ${remote}:/tmp
-+ rcp $SERVERS lmhttp XXXPREFIXXXX/share/lmbench/webpage-lm.tar ${remote}:/tmp
++ rcp $SERVERS lmhttp @PREFIX@/share/lmbench/webpage-lm.tar ${remote}:/tmp
for server in $SERVERS
do $RSH $remote -n /tmp/$server -s &
done
@@ -63,8 +63,8 @@ $NetBSD: patch-ai,v 1.1 1998/08/30 17:46:27 garbled Exp $
# I want a hot cache number
- lat_http $remote 8008 < ../../src/webpage-lm/URLS > /dev/null 2>&1
- lat_http $remote 8008 < ../../src/webpage-lm/URLS
-+ lat_http $remote 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS > /dev/null 2>&1
-+ lat_http $remote 8008 < XXXPREFIXXXX/share/lmbench/webpage-lm/URLS
++ lat_http $remote 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS > /dev/null 2>&1
++ lat_http $remote 8008 < @PREFIX@/share/lmbench/webpage-lm/URLS
lat_http -$remote 8008
RM=
for server in $SERVERS
diff --git a/benchmarks/lmbench/patches/patch-aj b/benchmarks/lmbench/patches/patch-aj
index 84a3518ba14..eb559ca64ee 100644
--- a/benchmarks/lmbench/patches/patch-aj
+++ b/benchmarks/lmbench/patches/patch-aj
@@ -1,4 +1,4 @@
-$NetBSD: patch-aj,v 1.1 1998/08/30 17:46:27 garbled Exp $
+$NetBSD: patch-aj,v 1.2 1998/09/24 08:45:00 agc Exp $
--- results/Makefile.orig Sun Aug 30 09:20:26 1998
+++ results/Makefile Sun Aug 30 09:23:43 1998
@@ -49,7 +49,7 @@
@@ -6,7 +6,7 @@ $NetBSD: patch-aj,v 1.1 1998/08/30 17:46:27 garbled Exp $
SHELL=/bin/sh
-SCRIPTS=../scripts/
-+SCRIPTS=XXXPREFIXXXX/bin/lmbench/
++SCRIPTS=@PREFIX@/bin/lmbench/
MISC= tmp/misc_mhz.bg \
tmp/lat_ctx.bg \