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 14:42:52 |
Message-ID: | alpine.DEB.2.10.1507211626000.30948@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Robert,
> On Fri, Jul 17, 2015 at 9:50 AM, Fabien <coelho(at)cri(dot)ensmp(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-07-21 14:45:01 | Re: [PATCH] postgres_fdw extension support |
Previous Message | Paul Ramsey | 2015-07-21 14:28:22 | Re: [PATCH] postgres_fdw extension support |