8000 Update scripts · postgrespro/postgres_cluster@2c24d13 · GitHub
[go: up one dir, main page]

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

Appearance settings

Commit 2c24d13

Browse files
committed
Update scripts
1 parent c95b0f4 commit 2c24d13

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

contrib/pg_tsdtm/tests/transfers.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ import (
1010
)
1111

1212
const (
13-
TRANSFER_CONNECTIONS = 10
13+
TRANSFER_CONNECTIONS = 4
1414
INIT_AMOUNT = 10000
15-
N_ITERATIONS = 10000
16-
N_ACCOUNTS = 100000
15+
N_ITERATIONS = 100000
16+
N_ACCOUNTS = 16
1717
)
1818

1919

2020
var cfg1 = pgx.ConnConfig{
21-
Host: "astro9",
22-
Port: 15432,
21+
Host: "localhost",
22+
Port: 5432,
2323
Database: "postgres",
2424
}
2525

2626
var cfg2 = pgx.ConnConfig{
27-
Host: "astro9",
28-
Port: 15433,
27+
Host: "localhost",
28+
Port: 5433,
2929
Database: "postgres",
3030
}
3131

@@ -109,8 +109,8 @@ func transfer(id int, wg *sync.WaitGroup) {
109109

110110
gtid := strconv.Itoa(id) + "." + strconv.Itoa(i)
111111
amount := 2*rand.Intn(2) - 1
112-
account1 := 2*id+1
113-
account2 := 2*id+2
112+
account1 := rand.Intn(N_ACCOUNTS)
113+
account2 := rand.Intn(N_ACCOUNTS)
114114

115115
exec(conn1, "begin transaction")
116116
exec(conn2, "begin transaction")

0 commit comments

Comments
 (0)
0