mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
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>
This commit is contained in:
parent
431a056271
commit
f16d4a2415
@ -2353,9 +2353,9 @@ printResults(int ttype, int64 normal_xacts, int nclients,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* only an average latency computed from the duration is available */
|
/* no measurement, show average latency computed from run time */
|
||||||
printf("latency average: %.3f ms\n",
|
printf("latency average: %.3f ms\n",
|
||||||
1000.0 * duration * nclients / normal_xacts);
|
1000.0 * time_include * nclients / normal_xacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (throttle_delay)
|
if (throttle_delay)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user