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

Commited850db

Browse files
committed
Add progres indicator at the prepare stage of transfers test.
1 parent1c90d78 commited850db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎contrib/pg_dtm/tests/transfers.go‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,17 @@ func prepare_db() {
7070
exec(conn1,"begin transaction isolation level "+ISOLATION_LEVEL)
7171
exec(conn2,"begin transaction isolation level "+ISOLATION_LEVEL)
7272

73+
start:=time.Now()
7374
fori:=0;i<N_ACCOUNTS;i++ {
7475
exec(conn1,"insert into t values($1, $2)",i,INIT_AMOUNT)
7576
exec(conn2,"insert into t values($1, $2)",i,INIT_AMOUNT)
77+
iftime.Since(start).Seconds()>1 {
78+
fmt.Printf(
79+
"inserted %0.2f%%: %d of %d records\n",
80+
float32(i+1)*100.0/float32(N_ACCOUNTS),i+1,N_ACCOUNTS,
81+
)
82+
start=time.Now()
83+
}
7684
}
7785

7886
commit(conn1,conn2)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp