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

Commitefe2382

Browse files
committed
pgbench: Avoid unnecessary measurement of connection delays.
Commit547f04e changed pgbench so that it used the measurement resultof connection delays in its benchmark report only when -C/--connect optionis specified. But previously those delays were unnecessarily measuredeven when that option is not specified. Which was a waste of cycles.This commit improves pgbench so that it avoids such unnecessary measurement.Back-patch to v14 where commit547f04e first appeared.Author: Yugo NagataReviewed-by: Fabien COELHO, Asif Rehman, Fujii MasaoDiscussion:https://postgr.es/m/20210614151155.a393bc7d8fed183e38c9f52a@sraoss.co.jp
1 parent7af5c38 commitefe2382

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

‎src/bin/pgbench/pgbench.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6622,6 +6622,7 @@ threadRun(void *arg)
66226622

66236623
thread_start=pg_time_now();
66246624
thread->started_time=thread_start;
6625+
thread->conn_duration=0;
66256626
last_report=thread_start;
66266627
next_report=last_report+ (int64)1000000*progress;
66276628

@@ -6645,14 +6646,6 @@ threadRun(void *arg)
66456646
gotodone;
66466647
}
66476648
}
6648-
6649-
/* compute connection delay */
6650-
thread->conn_duration=pg_time_now()-thread->started_time;
6651-
}
6652-
else
6653-
{
6654-
/* no connection delay to record */
6655-
thread->conn_duration=0;
66566649
}
66576650

66586651
/* GO */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp