aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/pgbench/README.pgbench6
-rw-r--r--contrib/pgbench/README.pgbench_jis6
-rw-r--r--contrib/pgbench/pgbench.c22
3 files changed, 31 insertions, 3 deletions
diff --git a/contrib/pgbench/README.pgbench b/contrib/pgbench/README.pgbench
index c96f0851a48..d576b594a9f 100644
--- a/contrib/pgbench/README.pgbench
+++ b/contrib/pgbench/README.pgbench
@@ -1,4 +1,4 @@
-pgbench README 2006/07/26 Tatsuo Ishii
+pgbench README 2006/10/21 Tatsuo Ishii
o What is pgbench?
@@ -235,6 +235,10 @@ Basically it is same as BSD license. See pgbench.c for more details.
o History
+2006/10/21
+ * more fix with handling default scaling factor in the default
+ scenarios
+
2006/09/14
* change "tps" to "scale" to avoid confusion
diff --git a/contrib/pgbench/README.pgbench_jis b/contrib/pgbench/README.pgbench_jis
index 0faa30de68b..adb22af4051 100644
--- a/contrib/pgbench/README.pgbench_jis
+++ b/contrib/pgbench/README.pgbench_jis
@@ -1,4 +1,4 @@
-pgbench README 2006/07/26 Tatsuo Ishii
+pgbench README 2006/10/21 Tatsuo Ishii
$B"#(Bpgbench $B$H$O!)(B
@@ -285,6 +285,10 @@ pgbench $B$O@P0f(B $BC#IW$K$h$C$F=q$+$l$^$7$?!%%i%$%;%s%9>r7o$O(B pgbench.c
$B"#2~DjMzNr(B
+2006/10/21
+ * $B99$K%G%U%)%k%H$N%9%1!<%j%s%0%U%!%/%?$r(Bbranches$B$+$i<h$C$F$3$J(B
+ $B$$%P%0$r=$@5!%(B
+
2006/09/13
* $BJQ?t(Btps$B$OJ6$i$o$7$$$N$G(Bscale$B$KJQ99!%%G%U%)%k%H%7%J%j%*$N;~$K!$(B
$B%G%U%)%k%H$N%9%1!<%j%s%0%U%!%/%?$r(Bbranches$B$+$i<h$C$F$3$J$$%P%0$r=$@5!%(B
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 3c15346e899..e880f638f06 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.57 2006/10/07 19:25:28 tgl Exp $
+ * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.58 2006/10/21 06:31:28 ishii Exp $
*
* pgbench: a simple benchmark program for PostgreSQL
* written by Tatsuo Ishii
@@ -1352,6 +1352,8 @@ main(int argc, char **argv)
memset(state + 1, 0, sizeof(*state) * (nclients - 1));
+ snprintf(val, sizeof(val), "%d", scale);
+
for (i = 1; i < nclients; i++)
{
int j;
@@ -1364,6 +1366,12 @@ main(int argc, char **argv)
exit(1);
}
}
+
+ if (putVariable(&state[i], "scale", val) == false)
+ {
+ fprintf(stderr, "Couldn't allocate memory for variable\n");
+ exit(1);
+ }
}
}
@@ -1425,6 +1433,18 @@ main(int argc, char **argv)
fprintf(stderr, "Couldn't allocate memory for variable\n");
exit(1);
}
+
+ if (nclients > 1)
+ {
+ for (i = 1; i < nclients; i++)
+ {
+ if (putVariable(&state[i], "scale", val) == false)
+ {
+ fprintf(stderr, "Couldn't allocate memory for variable\n");
+ exit(1);
+ }
+ }
+ }
}
if (!is_no_vacuum)