Fix pgbench's calculation of average latency, when -T is not used.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 21 Sep 2016 10:14:48 +0000 (13:14 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 21 Sep 2016 10:16:02 +0000 (13:16 +0300)
commit93834a20f67ee458c98067e253894457c5a958ad
tree495188d31b5a4138e76a8bb0878bca16401154a1
parent496c90b5e04729916ae9131ac93b2e63b46e3e2f
Fix pgbench's calculation of average latency, when -T is not used.

If the test duration was given in # of transactions (-t or no option),
rather as a duration (-T), the latency average was always printed as 0.
It has been broken ever since the display of latency average was added,
in 9.4.

Fabien Coelho

Discussion: <alpine.DEB.2.20.1607131015370.7486@sto>
src/bin/pgbench/pgbench.c