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

Commit028ba64

Browse files
committed
Parameterize 001_pgbench.pl: allow to define a number of transactions, clients and threads from the environment.
1 parent50d764e commit028ba64

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

‎t/001_pgbench.pl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,25 @@
1414
log_statement = 'ddl'
1515
});
1616

17-
# Test constants.
17+
# Test constants. Default values.
1818
my$TRANSACTIONS = 1000;
1919
my$CLIENTS = 10;
2020
my$THREADS = 10;
2121

22+
# Change pgbench parameters according to the environment variable.
23+
if (defined$ENV{TRANSACTIONS})
24+
{
25+
$TRANSACTIONS =$ENV{TRANSACTIONS};
26+
}
27+
if (defined$ENV{CLIENTS})
28+
{
29+
$CLIENTS =$ENV{CLIENTS};
30+
}
31+
if (defined$ENV{THREADS})
32+
{
33+
$THREADS =$ENV{THREADS};
34+
}
35+
2236
# General purpose variables.
2337
my$res;
2438
my$fss_count;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp