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

Commitbfd4567

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 parentbad6cef commitbfd4567

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
@@ -6603,6 +6603,7 @@ threadRun(void *arg)
66036603

66046604
thread_start=pg_time_now();
66056605
thread->started_time=thread_start;
6606+
thread->conn_duration=0;
66066607
last_report=thread_start;
66076608
next_report=last_report+ (int64)1000000*progress;
66086609

@@ -6626,14 +6627,6 @@ threadRun(void *arg)
66266627
gotodone;
66276628
}
66286629
}
6629-
6630-
/* compute connection delay */
6631-
thread->conn_duration=pg_time_now()-thread->started_time;
6632-
}
6633-
else
6634-
{
6635-
/* no connection delay to record */
6636-
thread->conn_duration=0;
66376630
}
66386631

66396632
/* GO */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp