mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Suppress bogus statistics when pgbench failed to complete any transactions.
Code added in 9.4 would attempt to divide by zero in such cases. Noted while testing fix for missing-pclose problem.
This commit is contained in:
@ -2299,6 +2299,10 @@ printResults(int ttype, int64 normal_xacts, int nclients,
|
|||||||
normal_xacts);
|
normal_xacts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remaining stats are nonsensical if we failed to execute any xacts */
|
||||||
|
if (normal_xacts <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (throttle_delay || progress)
|
if (throttle_delay || progress)
|
||||||
{
|
{
|
||||||
/* compute and show latency average and standard deviation */
|
/* compute and show latency average and standard deviation */
|
||||||
|
Reference in New Issue
Block a user