pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: steven.winfield@cantabcapital.com
Subject: BUG #15228: pgbench custom script numbering off-by-one
Date: Mon, 04 Jun 2018 14:37:41 +0000
Message-ID: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15228
Logged by:          Steven Winfield
Email address:      steven.winfield@cantabcapital.com
PostgreSQL version: 10.4
Operating system:   RHEL 7.4
Description:        

Hi,

There's an off-by-one error in script numbering in the human readable vs.
machine readable logs, i.e.:

echo SELECT 1 > script1.pgbench
echo SELECT 2 > script2.pgbench
pgbench -f script1.pgbench -f script2.pgbench -t 10 -l -r -n -d postgres <+
usual host/port args>

In the human readable output the scripts are numbered 1 and 2:
...
transaction type: multiple scripts
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
number of transactions per client: 10
number of transactions actually processed: 10/10
latency average = 1.546 ms
tps = 646.952556 (including connections establishing)
tps = 3325.667669 (excluding connections establishing)
SQL script 1: script1.pgbench
 - weight: 1 (targets 50.0% of total)
 - 5 transactions (50.0% of total, tps = 323.476278)
 - latency average = 0.298 ms
 - latency stddev = 0.195 ms
 - statement latencies in milliseconds:
         0.298  SELECT 1
SQL script 2: script2.pgbench
 - weight: 1 (targets 50.0% of total)
 - 5 transactions (50.0% of total, tps = 323.476278)
 - latency average = 0.186 ms
 - latency stddev = 0.003 ms
 - statement latencies in milliseconds:
         0.187  SELECT 2

...but in the 4th column of the log files written by pgbench they are
numbered 0 and 1:

0 0 686 0 1528121961 383002
0 1 229 0 1528121961 383228
0 2 202 0 1528121961 383430
0 3 188 1 1528121961 383618
0 4 187 1 1528121961 383806
0 5 188 0 1528121961 383993
0 6 181 1 1528121961 384174
0 7 187 1 1528121961 384361
0 8 189 1 1528121961 384550
0 9 185 0 1528121961 384735

It would be nice if these two outputs agreed.

Thanks,
Steve.



view thread (4+ messages)  latest in thread

Message-ID: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org>
Permalink:  ../152812306193.26720.11550263673951064628@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/152812306193.26720.11550263673951064628@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, steven.winfield@cantabcapital.com
  Subject: Re: BUG #15228: pgbench custom script numbering off-by-one
  In-Reply-To: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org>
  References: <152812306193.26720.11550263673951064628@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox