pgbench: More fix with handling default scaling factor in the default
scenarios. With multiple clinets, only the first client got the right scaling factor and this gave a illusion of better performance in case of the scaling factor greater than 1.
This commit is contained in:
parent
554032b3e4
commit
a5007d671a
@ -1,4 +1,4 @@
|
|||||||
pgbench README 2006/07/26 Tatsuo Ishii
|
pgbench README 2006/10/21 Tatsuo Ishii
|
||||||
|
|
||||||
o What is pgbench?
|
o What is pgbench?
|
||||||
|
|
||||||
@ -235,6 +235,10 @@ Basically it is same as BSD license. See pgbench.c for more details.
|
|||||||
|
|
||||||
o History
|
o History
|
||||||
|
|
||||||
|
2006/10/21
|
||||||
|
* more fix with handling default scaling factor in the default
|
||||||
|
scenarios
|
||||||
|
|
||||||
2006/09/14
|
2006/09/14
|
||||||
* change "tps" to "scale" to avoid confusion
|
* change "tps" to "scale" to avoid confusion
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pgbench README 2006/07/26 Tatsuo Ishii
|
pgbench README 2006/10/21 Tatsuo Ishii
|
||||||
|
|
||||||
$B"#(Bpgbench $B$H$O!)(B
|
$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
|
$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
|
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
|
* $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
|
$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
|
||||||
|
@ -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
|
* pgbench: a simple benchmark program for PostgreSQL
|
||||||
* written by Tatsuo Ishii
|
* written by Tatsuo Ishii
|
||||||
@ -1352,6 +1352,8 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
memset(state + 1, 0, sizeof(*state) * (nclients - 1));
|
memset(state + 1, 0, sizeof(*state) * (nclients - 1));
|
||||||
|
|
||||||
|
snprintf(val, sizeof(val), "%d", scale);
|
||||||
|
|
||||||
for (i = 1; i < nclients; i++)
|
for (i = 1; i < nclients; i++)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
@ -1364,6 +1366,12 @@ main(int argc, char **argv)
|
|||||||
exit(1);
|
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");
|
fprintf(stderr, "Couldn't allocate memory for variable\n");
|
||||||
exit(1);
|
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)
|
if (!is_no_vacuum)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user