Hi,
> Hi,
>
> I would like to improve the following two points on the result outputs
> of pgbench related to faild transaction. The patch is attached.
>
> (1) Output per-script statistics even when there are no successful
> transaction if there is any failed transactions due to serialization
> or deadlock errors.
>
> Previously, per-script statistics were never output when any transactions
> are failed. However, it is reasonable to report per-script failed transactions
> if they are due to serialization or deadlock errors, since these kinds of
> failures are now objects to be reported.
>
> This is fixed by modifying the following condition to use "total_cnt <= 0".
>
> /* Remaining stats are nonsensical if we failed to execute any xacts */
> if (total->cnt + total->skipped <= 0)
> return;
>
> (2) Avoid to print "NaN%" in lines on failed transaction reports.
This itself sounds good. However, in case (1) still "NaN%" are
printed. This looks inconsistent.
t-ishii$ src/bin/pgbench/pgbench -p 11002 -c1 -t 1 -f c.sql -f d.sql --failures-detailed test
pgbench (18devel)
starting vacuum...end.
transaction type: multiple scripts
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
maximum number of tries: 1
number of transactions per client: 1
number of transactions actually processed: 0/1
number of failed transactions: 1 (100.000%)
number of serialization failures: 1 (100.000%)
number of deadlock failures: 0 (0.000%)
latency average = 7023.604 ms (including failures)
initial connection time = 4.964 ms
tps = 0.000000 (without initial connection time)
SQL script 1: c.sql
- weight: 1 (targets 50.0% of total)
- 0 transactions (NaN% of total, tps = 0.000000)
SQL script 2: d.sql
- weight: 1 (targets 50.0% of total)
- 0 transactions (NaN% of total, tps = 0.000000)
- number of failed transactions: 1 (100.000%)
- number of serialization failures: 1 (100.000%)
- number of deadlock failures: 0 (0.000%)
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp