Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5007d6

Browse files
committed
pgbench: More fix with handling default scaling factor in the default
scenarios. With multiple clinets, only the first client got the rightscaling factor and this gave a illusion of better performance in caseof the scaling factor greater than 1.
1 parent554032b commita5007d6

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

‎contrib/pgbench/README.pgbench

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pgbench README2006/07/26 Tatsuo Ishii
1+
pgbench README2006/10/21 Tatsuo Ishii
22

33
o What is pgbench?
44

@@ -235,6 +235,10 @@ Basically it is same as BSD license. See pgbench.c for more details.
235235

236236
o History
237237

238+
2006/10/21
239+
* more fix with handling default scaling factor in the default
240+
scenarios
241+
238242
2006/09/14
239243
* change "tps" to "scale" to avoid confusion
240244

‎contrib/pgbench/README.pgbench_jis

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pgbench README2006/07/26 Tatsuo Ishii
1+
pgbench README2006/10/21 Tatsuo Ishii
22

33
$B"#(Bpgbench $B$H$O!)(B
44

@@ -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
285285

286286
$B"#2~DjMzNr(B
287287

288+
2006/10/21
289+
* $B99$K%G%U%)%k%H$N%9%1!<%j%s%0%U%!%/%?$r(Bbranches$B$+$i<h$C$F$3$J(B
290+
$B$$%P%0$r=$@5!%(B
291+
288292
2006/09/13
289293
* $BJQ?t(Btps$B$OJ6$i$o$7$$$N$G(Bscale$B$KJQ99!%%G%U%)%k%H%7%J%j%*$N;~$K!$(B
290294
$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

‎contrib/pgbench/pgbench.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.57 2006/10/07 19:25:28tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.58 2006/10/21 06:31:28ishii Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -1352,6 +1352,8 @@ main(int argc, char **argv)
13521352

13531353
memset(state+1,0,sizeof(*state)* (nclients-1));
13541354

1355+
snprintf(val,sizeof(val),"%d",scale);
1356+
13551357
for (i=1;i<nclients;i++)
13561358
{
13571359
intj;
@@ -1364,6 +1366,12 @@ main(int argc, char **argv)
13641366
exit(1);
13651367
}
13661368
}
1369+
1370+
if (putVariable(&state[i],"scale",val)== false)
1371+
{
1372+
fprintf(stderr,"Couldn't allocate memory for variable\n");
1373+
exit(1);
1374+
}
13671375
}
13681376
}
13691377

@@ -1425,6 +1433,18 @@ main(int argc, char **argv)
14251433
fprintf(stderr,"Couldn't allocate memory for variable\n");
14261434
exit(1);
14271435
}
1436+
1437+
if (nclients>1)
1438+
{
1439+
for (i=1;i<nclients;i++)
1440+
{
1441+
if (putVariable(&state[i],"scale",val)== false)
1442+
{
1443+
fprintf(stderr,"Couldn't allocate memory for variable\n");
1444+
exit(1);
1445+
}
1446+
}
1447+
}
14281448
}
14291449

14301450
if (!is_no_vacuum)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp