From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: pgbench stats per script & other stuff
Date: Wed, 2 Sep 2015 20:20:45 +0200 (CEST)
Message-ID: <alpine.DEB.2.10.1509022002110.21677@sto> (raw)
In-Reply-To: <20150902172617.GJ5286@alap3.anarazel.de>
References: <alpine.DEB.2.10.1507220706260.5636@sto>
<WM!36f7f6aea11042e334dd8ddca8dd52df3de0913ec1f5bc42bfcc27f3eb60d576c8dac02c33f02b88abead156dfec3da0!@asav-2.01.com>
<55AFD8C6.8010507@agliodbs.com>
<CA+TgmobZSBmWzugAQp94=q98c2fmSBc+gRPwfNM+94dhjpL3tg@mail.gmail.com>
<alpine.DEB.2.10.1507231759400.10585@sto>
<CA+TgmoZEvNJ8wkVdHCsWnsz8Rz-MHebGp4DY+8WjiU-xYPT6Nw@mail.gmail.com>
<alpine.DEB.2.10.1507250910540.20046@sto>
<alpine.DEB.2.10.1507251618230.25082@sto>
<alpine.DEB.2.10.1507281626330.3538@sto>
<alpine.DEB.2.10.1507301801500.22793@sto>
<20150902172617.GJ5286@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Hello Andres,
> Maybe add --builtin list to show them?
Yep, easy enough.
>> [...]
>> + Shorthand for <option>-b simple-update@1</>.
>> + Shorthand for <option>-b select-only@1</>.
>
> I'm a bit inclined to remove these options.
Hm...
This is really backward compatibility, and people may find reference to
these in blogs or elswhere, so I think that it would make sense to
be upward compatible.
I would certainly be against adding any other of these options, though.
>> + Each script may be given a relative weight specified after a
>> + <literal>@</> so as to change its drawing probability.
>> + The default weight is <literal>1</>.
>
> I'm wondering if percentages instead of weights would be a better
> idea. That'd mean you'd be forced to be more careful when adding another
> script (having to adjust the percentages of other scripts) but arguably
> that's a good thing?
If you use only percent, then you have to check that the total is 100,
probably you have to use floats, to do something when the total is not
100, checking would complicate the code and test people mental calculus
abilities. Not sure this is a good idea:-)
In the use case you outline, when adding a script, maybe you know that it
runs "as much as" this other script, so you can pick up the same weight
without bothering.
Also, when testing, there is an issue when you want to remove one script
for a quick test, and that would mean changing all percentages on the
command line...
So I would advise not to put such a constraint.
>> +static SQLScript sql_script[MAX_SCRIPTS];
>>
>> +static struct {
>> + char *name; /* very short name for -b ...*/
>> + char *desc; /* short description */
>> + char *script; /* actual pgbench script */
>> +} builtin_script[]
>
> Can't we put these in the same array?
I do not understand.
>> + printf("transaction type: %s\n",
>> + num_scripts == 1? sql_script[0].name: "multiple scripts");
>
> Seems like it'd be more useful to simply always list the scripts +
> weights here.
The detailed list is shown later, with the summary performance figure for
each scripts, so ISTM that it would be redundant? Maybe the transaction
type could be moved downwards just before said list?
--
Fabien.
--
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: coelho@cri.ensmp.fr, andres@anarazel.de, robertmhaas@gmail.com, josh@agliodbs.com
Subject: Re: pgbench stats per script & other stuff
In-Reply-To: <alpine.DEB.2.10.1509022002110.21677@sto>
* 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