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

Commitc70b193

Browse files
committed
[PGPRO-4074] Pgbench routines to PostgresNode
(cherry picked from commit 6d6f53ca5982deaf85ee00e12a9ed5b9d6f4354f)tags: multimaster(cherry picked from commit 3f887be71cc8ad0bafebdfebae880b506b3ea1f7)
1 parenta8dfe41 commitc70b193

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,6 +2136,37 @@ sub pg_recvlogical_upto
21362136
}
21372137
}
21382138

2139+
subpgbench()
2140+
{
2141+
my ($self,$node,@args) =@_;
2142+
my$pgbench_handle =$self->pgbench_async($node,@args);
2143+
$self->pgbench_await($pgbench_handle);
2144+
}
2145+
2146+
subpgbench_async()
2147+
{
2148+
my ($self,@args) =@_;
2149+
2150+
my ($in,$out,$err,$rc);
2151+
$in ='';
2152+
$out ='';
2153+
2154+
my@pgbench_command = (
2155+
'pgbench',
2156+
-h=>$self->host,
2157+
-p=>$self->port,
2158+
@args
2159+
);
2160+
my$handle = IPC::Run::start(\@pgbench_command,$in,$out);
2161+
return$handle;
2162+
}
2163+
2164+
subpgbench_await()
2165+
{
2166+
my ($self,$pgbench_handle) =@_;
2167+
IPC::Run::finish($pgbench_handle) || BAIL_OUT("pgbench exited with$?");
2168+
}
2169+
21392170
=pod
21402171
21412172
=back

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp