Re: pgbench stats per script & other stuff

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench stats per script & other stuff
Date: 2016-01-13 13:37:27
Message-ID: alpine.DEB.2.10.1601131343531.2188@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Alvaro,

>> Here is a two part v12, which:
>>
>> part a (refactoring of scripts and their stats):
>> - fix option checks (-i alone)
>> - s/repleacable/replaceable/ in doc
>> - keep small description in doc and help for -S & -N
>> - fix 2 comments for pg style
>> - show builtin list if not found
>
> I'm looking at this part of your patch and I think it's far too big to
> be a simple refactoring. Would you split it up please?
> I think the StatsData / SimpleStat addition should be one patch;
> then there's the -b changes. Then there may (or may not) be a bunch of
> other minor cleanups, not sure.
>
> I'm willing to commit these patches if I can easily review what they do,
> which I cannot with the current state.

Hmmm. ISTM that other people already reviewed it.

I can try to separate (again) some stuff, but there will be no miracle.

The overdue refactoring is because pgbench collects statistics at various
levels, and each time this is done in a different way. Cleaning this
requires to touch the stuff in many places, which means a "big" patch,
although ISTM a straightforward one, but this already the case with this
one.

> Please pgindent; make sure to add /*--- here to avoid pgindent mangling
> the comment:

Ok.

>> part b (weight)
>> - check that the weight is an int
>
> This part looks okay to me. Minor nitpick,
>
> + int i = 0, w = 0, wc = (int) getrand(thread, 0, total_weight - 1);
>
> should be three lines, not one.

Ok.

> Also the @W part in the --help output should be in brackets, as
> FILE[(at)W], right?

Why not.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2016-01-13 13:47:37 Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102
Previous Message Vladimir Sitnikov 2016-01-13 13:36:06 Re: Fwd: [JDBC] Re: 9.4-1207 behaves differently with server side prepared statements compared to 9.2-1102