]> granicus.if.org Git - postgresql/commitdiff
Whack Wisconsin benchmark around until it actually works again.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Sep 2004 17:25:40 +0000 (17:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 1 Sep 2004 17:25:40 +0000 (17:25 +0000)
It's still useless because it tests a standalone backend, but at least
the bit rot is repaired.

src/test/bench/Makefile
src/test/bench/WISC-README
src/test/bench/create.sh
src/test/bench/perquery
src/test/bench/runwisc.sh

index 39eca668678196c70fda4d6656261f9aa32bf887..1a506d5afd0e6640615cdcad0bcf8a9c07a998c2 100644 (file)
@@ -3,11 +3,12 @@
 # Makefile--
 #    Makefile for the Wisconsin Benchmark
 #
-# Copyright (c) 1994-5, Regents of the University of California
+# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994-5, Regents of the University of California
 #
 #
 # IDENTIFICATION
-#    $PostgreSQL: pgsql/src/test/bench/Makefile,v 1.10 2003/11/29 19:52:14 pgsql Exp $
+#    $PostgreSQL: pgsql/src/test/bench/Makefile,v 1.11 2004/09/01 17:25:40 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -18,23 +19,14 @@ include $(top_builddir)/src/Makefile.global
 CREATEFILES= create.sql bench.sql
 OUTFILES= bench.out bench.out.perquery
 
-override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
-override CFLAGS += $(CFLAGS_SL)
-
 
 all: $(CREATEFILES)
        rm -f $(OUTFILES)
 
 create.sql: create.source
-       if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
-       if [ -z "$$USER" ]; then USER=`whoami`; fi; \
-       if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \
        rm -f $@; \
        C=`pwd`; \
-       sed -e "s:_CWD_:$$C:g" \
-           -e "s:_OBJWD_:$$C:g" \
-           -e "s:_SLSUFF_:$(SLSUFF):g" \
-           -e "s/_USER_/$$USER/g" < $< > $@
+       sed -e "s:_CWD_:$$C:g"  < $< > $@
 
 bench.sql: 
        x=1; \
@@ -48,13 +40,12 @@ runtest: $(OUTFILES)
 
 bench.out: $(CREATEFILES)
        $(SHELL) ./create.sh $$PGDATA && \
-       $(SHELL) ./runwisc.sh $$PGDATA >bench.out 2>&1
+       $(SHELL) ./runwisc.sh $$PGDATA > $@
        @echo "RESULTS OF BENCHMARK ARE SAVED IN FILE bench.out";
 
 bench.out.perquery: bench.out
-       $(SHELL) ./perquery <bench.out 2>&1 > $@
-       @echo "BREAKDOWN OF BENCHMARK IS SAVED IN FILE" \
-         "bench.out.perquery";
+       $(SHELL) ./perquery <bench.out > $@
+       @echo "BREAKDOWN OF BENCHMARK IS SAVED IN FILE bench.out.perquery";
 
 clean:
        rm -f $(OUTFILES) $(CREATEFILES)
index 7142802f927520fe3463f576e21107c8e536c1c8..f838dd3fa5a5044ddfa5a4940bbf7176c561b89d 100644 (file)
@@ -1,5 +1,13 @@
 The Postgres Wisconsin Benchmark
 
+The short form of the directions below:
+
+       ensure postmaster is stopped
+       export PGDATA=/wherever
+       make runtest
+
+The long form:
+
 In this directory are the queries and raw data files used to populate the
 Postgres version of the Wisconsin benchmark.  In order to run the benchmark,
 you'll initially need to execute the script
index 8a7a3da4a9aa9a1056d17cb0d785183258f31da9..77c083683032fe76274d30801df0d25f00a40247 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
-# $PostgreSQL: pgsql/src/test/bench/create.sh,v 1.3 2003/11/29 19:52:14 pgsql Exp $
+# $PostgreSQL: pgsql/src/test/bench/create.sh,v 1.4 2004/09/01 17:25:40 tgl Exp $
 # 
 if [ ! -d $1 ]; then
-       echo " you must specify a valid data directory "
+       echo " you must specify a valid data directory " >&2
        exit
 fi
 if [ -d ./obj ]; then
@@ -19,7 +19,7 @@ if [ $? -ne 0 ]; then
        exit 1
 fi
 
-postgres -D${1} -Q bench < create.sql > /dev/null
+postgres -D${1} bench < create.sql > /dev/null
 if [ $? -ne 0 ]; then
        echo initial database load failed
        exit 1
index 4f0ba03ce61fb57608a62165400b5f1c423237eb..e6f5c43c304756ced31727f162eb05a7c68b0c3c 100644 (file)
@@ -1,12 +1,9 @@
 #!/bin/sh
 
-egrep 'x = "|elapse' > /tmp/foo$$
-
+egrep 'x = "|elapse' | \
 awk 'BEGIN { x = 0; y = 0; z = 0; a = 0; } \
      /.*elapse.*/ {x = $2 + x; y = $4 + y; z = $6 + z;} \
      /.*x = ".*/ { \
         printf "query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z; \
         x = 0; y = 0; z = 0; a = a + 1; } \
-     END {printf("query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z);}' \
-        < /tmp/foo$$
-        
+     END {printf("query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z);}'
index 642edd3f0d25859a8f7d872df602cf36d5321818..690f00880629e09f8eac0b649640ef9a3ed2198c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $PostgreSQL: pgsql/src/test/bench/runwisc.sh,v 1.5 2003/11/29 19:52:14 pgsql Exp $
+# $PostgreSQL: pgsql/src/test/bench/runwisc.sh,v 1.6 2004/09/01 17:25:40 tgl Exp $
 # 
 # Note that in our published benchmark numbers, we executed the command in the
 # following fashion:
@@ -7,7 +7,7 @@
 # time $POSTGRES -texecutor -tplanner -f hashjoin -Q bench
 #
 if [ ! -d $1 ]; then
-        echo " you must specify a valid data directory "
+        echo " you must specify a valid data directory " >&2
         exit
 fi
 
@@ -15,8 +15,8 @@ if [ -d ./obj ]; then
        cd ./obj
 fi
 
-echo =============== vacuuming benchmark database... =================
-echo "vacuum" | postgres -D${1} -Q bench > /dev/null
+echo =============== vacuuming benchmark database... ================= >&2
+echo "vacuum" | postgres -D${1} bench > /dev/null
 
-echo =============== running benchmark... =================
-time postgres -D${1} -texecutor -tplanner -Q bench < bench.sql
+echo =============== running benchmark... ================= >&2
+time postgres -D${1} -texecutor -tplanner -c log_min_messages=log -c log_destination=stderr -c redirect_stderr=off bench < bench.sql 2>&1