pgbench: Avoid unnecessary measurement of connection delays.
authorFujii Masao <fujii@postgresql.org>
Mon, 30 Aug 2021 12:35:24 +0000 (21:35 +0900)
committerFujii Masao <fujii@postgresql.org>
Mon, 30 Aug 2021 12:37:43 +0000 (21:37 +0900)
commitefe2382d5ade2c8d63f2aa1b48cc85691a2bfabd
tree5c5bd71e6ba8f136d51fb968d419e513bb62cb5e
parent7af5c38eb9da5b0ae72c1dd3d847f43cd39d1f5a
pgbench: Avoid unnecessary measurement of connection delays.

Commit 547f04e734 changed pgbench so that it used the measurement result
of connection delays in its benchmark report only when -C/--connect option
is specified. But previously those delays were unnecessarily measured
even 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 commit 547f04e734 first appeared.

Author: Yugo Nagata
Reviewed-by: Fabien COELHO, Asif Rehman, Fujii Masao
Discussion: https://postgr.es/m/20210614151155.a393bc7d8fed183e38c9f52a@sraoss.co.jp
src/bin/pgbench/pgbench.c