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:
parent
d38e8d30ce
commit
de8e46f5f5
@ -2541,6 +2541,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 && latency_limit)
|
if (throttle_delay && latency_limit)
|
||||||
printf("number of transactions skipped: " INT64_FORMAT " (%.3f %%)\n",
|
printf("number of transactions skipped: " INT64_FORMAT " (%.3f %%)\n",
|
||||||
throttle_latency_skipped,
|
throttle_latency_skipped,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user