Re: pgbench stats per script & other stuff

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench stats per script & other stuff
Date: 2015-07-21 18:41:35
Message-ID: alpine.DEB.2.10.1507212038130.30948@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> [...] and that a subsequent -w modifies the meaning of the
>> script-specifiying argument already read. That strikes me as a very
>> unintuitive interface.
>
> Ok, I understand this "afterward modification" objection.
>
> What if the -w would be required *before*, and supply a weight for (the
> first/maybe all) script(s) specified *afterwards*, so it does not modify
> something already provided? I think it would be more intuitive, or at least
> less surprising.

Here is a v3 which does that. If there is a better idea, do not hesitate!

sh> ./pgbench -w 9 -f one.sql -f now.sql -T 2 -P 1 --per-script-stats
starting vacuum...end.
progress: 1.0 s, 24536.0 tps, lat 0.039 ms stddev 0.024
progress: 2.0 s, 25963.8 tps, lat 0.038 ms stddev 0.015
transaction type: multiple scripts
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
duration: 2 s
number of transactions actually processed: 50501
latency average = 0.039 ms
latency stddev = 0.020 ms
tps = 25249.464772 (including connections establishing)
tps = 25339.454154 (excluding connections establishing)
SQL script 0, weight 9: one.sql
- 45366 transactions (89.8% of total, tps = 22682.070035)
- latency average = 0.038 ms
- latency stddev = 0.016 ms
SQL script 1, weight 1: now.sql
- 5135 transactions (10.2% of total, tps = 2567.394737)
- latency average = 0.044 ms
- latency stddev = 0.041 ms

--
Fabien.

Attachment Content-Type Size
pgbench-script-stats-3.patch text/x-diff 50.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2015-07-21 19:37:41 Re: WAL logging problem in 9.4.3?
Previous Message Paul Ramsey 2015-07-21 18:29:25 Re: [PATCH] postgres_fdw extension support