From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Subject: Re: pgbench stats per script & other stuff
Date: Wed, 22 Jul 2015 10:54:14 -0700
Message-ID: <55AFD8C6.8010507@agliodbs.com> (raw)
In-Reply-To: <WM!36f7f6aea11042e334dd8ddca8dd52df3de0913ec1f5bc42bfcc27f3eb60d576c8dac02c33f02b88abead156dfec3da0!@asav-2.01.com>
References: <alpine.DEB.2.10.1507171544450.26125@sto>
<CA+Tgmoa=ud6E=4afK3srNj_4j8Cckm4OD_=0=uxSD5JVwsO4rQ@mail.gmail.com>
<alpine.DEB.2.10.1507211626000.30948@sto>
<CA+TgmoYQi7sPG+b_19Y4bn2wUPUujsSZ_qOF8nWZTrC1Pbqivg@mail.gmail.com>
<alpine.DEB.2.10.1507211819460.30948@sto>
<WM!aa4cff4a48647dfeb51adbc23faaba1f82d825d5edc7fcfe10aa08a36243c5ffb656060d76dd428676a64e1e72c8a672!@asav-2.01.com>
<55AEDDA4.8020009@agliodbs.com>
<alpine.DEB.2.10.1507220706260.5636@sto>
<WM!36f7f6aea11042e334dd8ddca8dd52df3de0913ec1f5bc42bfcc27f3eb60d576c8dac02c33f02b88abead156dfec3da0!@asav-2.01.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 07/21/2015 10:25 PM, Fabien COELHO wrote:
>
> Hello Josh,
>
>>> Maybe -f file.sql:weight (yuk from my point of view, but it can be done
>>> easily).
>>
>> Maybe it's past time for pgbench to have a config file?
>
> That is an idea. For "simple" usage, for backward compatibility and for
> people like me who like them, ISTM that options are fine too:-)
>
> Also this may mean adding a dependency to some YAML library, configure
> issues (I'm not sure whether pg currently uses YAML, and JSON is quite
> verbose), maybe conditionals around the feature to compile without the
> dependency, more documentation...
>
> I'm not sure all that is desirable just for weighting scripts.
Maybe not.
If so, I would vote for:
-f script1.bench:3 -f script2.bench:1
over:
-f script1.bench -w 3 -f script2.bench -w 1
Making command-line options order-dependant breaks a lot of system call
libraries in various languages, as well as being easy to mess up.
>> Given that we want to define some per-workload options, the config file
>> would probably need to be YAML or JSON, e.g.:
>>
>> [...]
>>
>> script1:
>> file: script1.bench
>> weight: 3
>> script2:
>> file: script2.bench
>> weight: 1
>>
>> the above would execute a pgbench with 16 clients, 4 threads, "script1"
>> three times as often as script2, and report stats at the script (rather
>> than SQL statement) level.
>
> Yep. Probably numbering within field names should be avoided, so a list
> of records that could look like:
Oh, you misunderstand. "script1" and "script2" are meant to be
user-supplied names which then get reported in things like response time
output. They're labels. Better example:
deposit:
file: deposit.bench
weight: 3
withdrawal:
file: withdrawal.bench
weight: 3
reporting:
file: summary_report.bench
weigh: 1
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: pgbench stats per script & other stuff
In-Reply-To: <55AFD8C6.8010507@agliodbs.com>
* 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