Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZXBp0-0007S2-Tx for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Sep 2015 17:27:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZXBp0-0008PC-6d for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Sep 2015 17:27:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZXBnh-0006xH-Kc for pgsql-hackers@postgresql.org; Wed, 02 Sep 2015 17:26:21 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZXBne-0003rc-Tg for pgsql-hackers@postgresql.org; Wed, 02 Sep 2015 17:26:21 +0000 Received: from intern.anarazel.de (ns1.anarazel.de [217.115.131.41]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 4B472860001; Wed, 2 Sep 2015 19:26:18 +0200 (CEST) Date: Wed, 2 Sep 2015 19:26:17 +0200 From: Andres Freund To: Fabien COELHO Cc: Robert Haas , Josh Berkus , "pgsql-hackers@postgresql.org" Subject: Re: pgbench stats per script & other stuff Message-ID: <20150902172617.GJ5286@alap3.anarazel.de> References: <55AFD8C6.8010507@agliodbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2015-07-30 18:03:56 +0200, Fabien COELHO wrote: > > >v6 is just a rebase after a bug fix by Andres Freund. > > > >Also a small question: The patch currently displays pgbench scripts > >starting numbering at 0. Probably a little too geek... should start at 1? > > v7 is a rebase after another small bug fix in pgbench. > > -- > Fabien. > diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml > index 2517a3a..99670d4 100644 > --- a/doc/src/sgml/ref/pgbench.sgml > +++ b/doc/src/sgml/ref/pgbench.sgml > @@ -261,6 +261,23 @@ pgbench options dbname > benchmarking arguments: > > > + > + > + > + > + > + Add the specified builtin script to the list of executed scripts. > + An optional integer weight after @ allows to adjust the > + probability of drawing the test. > + Available builtin scripts are: tpcb-like, > + simple-update and select-only. > + The provided scriptname needs only to be a prefix > + of the builtin name, hence simp would be enough to select > + simple-update. > + > + > + Maybe add --builtin list to show them? > @@ -404,10 +422,7 @@ pgbench options dbname > > > > - Do not update pgbench_tellers and > - pgbench_branches. > - This will avoid update contention on these tables, but > - it makes the test case even less like TPC-B. > + Shorthand for > > > @@ -511,7 +526,7 @@ pgbench options dbname > > > > - Perform select-only transactions instead of TPC-B-like test. > + Shorthand for > > I'm a bit inclined to remove these options. > > - The default transaction script issues seven commands per transaction: > + Pgbench executes test scripts chosen randomly from a specified list. > + They include built-in scripts with 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? > +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? > + 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. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers