pgbench: Improve time logic.
authorThomas Munro <tmunro@postgresql.org>
Wed, 10 Mar 2021 03:09:50 +0000 (16:09 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 10 Mar 2021 04:44:04 +0000 (17:44 +1300)
commit547f04e7348b6ed992bd4a197d39661fe7c25097
treeffb02da6d78cc3aeee3df4f132de1688baa05e68
parentb1d6a8f86813772b9198367a34c8ff8bff7fef9e
pgbench: Improve time logic.

Instead of instr_time (struct timespec) and the INSTR_XXX macros,
introduce pg_time_usec_t and use integer arithmetic.  Don't include the
connection time in TPS unless using -C mode, but report it separately.

Author: Fabien COELHO <coelho@cri.ensmp.fr>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/20200227180100.zyvjwzcpiokfsqm2%40alap3.anarazel.de
doc/src/sgml/ref/pgbench.sgml
src/bin/pgbench/pgbench.c
src/include/portability/instr_time.h
src/tools/pgindent/typedefs.list