pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Subject: Re: pgbench stats per script & other stuff
Date: Tue, 21 Jul 2015 16:42:52 +0200 (CEST)
Message-ID: <alpine.DEB.2.10.1507211626000.30948@sto> (raw)
In-Reply-To: <CA+Tgmoa=ud6E=4afK3srNj_4j8Cckm4OD_=0=uxSD5JVwsO4rQ@mail.gmail.com>
References: <alpine.DEB.2.10.1507171544450.26125@sto>
	<CA+Tgmoa=ud6E=4afK3srNj_4j8Cckm4OD_=0=uxSD5JVwsO4rQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


Hello Robert,

> On Fri, Jul 17, 2015 at 9:50 AM, Fabien <coelho@cri.ensmp.fr> wrote:
>>   sh> ./pgbench -T 3 -B -N -w 2 -S -w 7 --per-script-stats
>
> That is a truly horrifying abuse of command-line arguments.  -1 from
> me, or minus more than one if I've got that many chits to burn.

Are you against the -w, or against saying that pgbench execute scripts, 
whether internal or from files?

The former is obviously a matter of taste and I can remove "-w" if nobody 
wants it, too bad because the feature seems useful to me from a testing 
point of view, this is a choice between aesthetic and feature. Note that 
you do not have to use it if you do not like it.

The later really homogeneise the code internally and allows to factor out 
things, to have orthogonal features (internal scripts are treated the same 
way as external files, this requires less lines of code because it is 
simpler), and does not harm anyone IMO, so it would be sad to let it go.

> I have been thinking that the way to do this is to push more into the
> script file itself, e.g. allow:
>
> \if random() < 0.1
> stuff
> \else
> other stuff
> \endif
>
> Maybe that's overkill and there's some way of specifying multiple
> scripts on the command line, but IMO what you've got here is not it.

I think that is overkill, and moreover it is not useful: the point is to 
collect statistics *per scripts*, with an "random if" you would not know 
which part was executed, so you would loose the whole point of having per 
script stats.

If you have another suggestion about how to provide weights, which does 
not rely on ifs nor on options? Maybe a special comment in the script (yuk 
from my point of view because the script would carry its weight whereas I 
think this should be orthogonal to the script contents, but it would be 
better than nothing..).

-- 
Fabien.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (92+ messages)  latest in thread

Message-ID: <alpine.DEB.2.10.1507211626000.30948@sto>
Permalink:  ../alpine.DEB.2.10.1507211626000.30948@sto/
Also on:    postgresql.org/message-id/alpine.DEB.2.10.1507211626000.30948@sto

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: coelho@cri.ensmp.fr, robertmhaas@gmail.com
  Subject: Re: pgbench stats per script & other stuff
  In-Reply-To: <alpine.DEB.2.10.1507211626000.30948@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