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-23 14:18:57
Message-ID: alpine.DEB.2.10.1601231501570.21060@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello Alvaro,

> 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?

You know how delighted I am to split patches...

Here is a 5 part ordered patch serie:

a) add -b option for cumulating builtins and rework internal script
management so that builtin and external scripts are managed the
same way.

b) refactor statistics collections (per thread, per command, per whatever)
so as to use the same structure everywhere, reducing the CLOC by 115.
this enables the next small patch which can reuse the new functions.

c) add per-script statistics... because Josh asked:-)

d) add optional weight to control the relative frequency of scripts.

e) minor code cleanup :
use bool instead of int where appropriate
put together struct fields when they belong together
move 2 options at their right position in the list

This patch serie conflicts slightly with the "add functions to pgbench"
patch which is marked as ready in the CF. The first to make it will mean
some conflict resolution for the other. Maybe I would prefer this one
serie to go first, if I had any say...


Attachment Content-Type Size
pgbench-script-stats-13-a.patch text/x-diff 23.5 KB
pgbench-script-stats-13-b.patch text/x-diff 32.3 KB
pgbench-script-stats-13-c.patch text/x-diff 5.0 KB
pgbench-script-stats-13-d.patch text/x-diff 8.6 KB
pgbench-script-stats-13-e.patch text/x-diff 4.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-01-23 15:00:25 Re: insert/update performance
Previous Message David Rowley 2016-01-23 13:51:03 Re: Removing Functionally Dependent GROUP BY Columns