I noticed that despite pgbouncer supporting the reporting of wait_time since the 1.8.0 release, that this is not yet supported by pgbadger. So, I took some inspiration from how the computations for the average duration of queries was done to achieve the same thing.
This is the relevant output of running pgbadger t/fixtures/pgbouncer.log.gz, which seems correct, taking the values (listed below) into account:
zcat -f t/fixtures/pgbouncer.log.gz | grep "wait time"
2018-09-12 16:09:54.778 3394 LOG stats: 281 xacts/s, 1967 queries/s, in 118855 B/s, out 93433 B/s, xact 17057 us, query 2360 us, wait time 8672 us
2018-09-12 16:10:54.781 3394 LOG stats: 481 xacts/s, 481 queries/s, in 29782 B/s, out 103650 B/s, xact 487 us, query 487 us, wait time 13727 us
2018-09-12 16:11:54.785 3394 LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 0 B/s, xact 0 us, query 0 us, wait time 0 us
2018-09-12 16:12:54.787 3394 LOG stats: 0 xacts/s, 0 queries/s, in 0 B/s, out 0 B/s, xact 0 us, query 0 us, wait time 0 us
2018-09-12 16:13:54.789 3394 LOG stats: 303 xacts/s, 2124 queries/s, in 128355 B/s, out 100904 B/s, xact 19782 us, query 2709 us, wait time 1776 us
Hello, @darold 👋🏽
I noticed that despite
pgbouncer
supporting the reporting ofwait_time
since the1.8.0
release, that this is not yet supported bypgbadger
. So, I took some inspiration from how the computations for the average duration of queries was done to achieve the same thing.This is the relevant output of running
pgbadger t/fixtures/pgbouncer.log.gz
, which seems correct, taking the values (listed below) into account: