Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHYmJ-0005e1-NR for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jul 2015 14:44:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHYmI-0006xn-On for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jul 2015 14:44:18 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZHYl1-0005OE-He for pgsql-hackers@postgresql.org; Tue, 21 Jul 2015 14:42:59 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHYky-0003b1-5L for pgsql-hackers@postgresql.org; Tue, 21 Jul 2015 14:42:58 +0000 Received: from cri.ensmp.fr (93-35-198-203.ip56.fastwebnet.it [93.35.198.203]) (authenticated bits=0) by boipeva.ensmp.fr (8.15.1/8.15.1/JMMC-22/Oct/2013) with ESMTPSA id t6LEgqVt001650 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Jul 2015 16:42:53 +0200 Date: Tue, 21 Jul 2015 16:42:52 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@sto To: Robert Haas cc: PostgreSQL Developers Subject: Re: pgbench stats per script & other stuff In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at boipeva.ensmp.fr with ID 55AE5A6C.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID fabien.coelho X-j-chkmail-Enveloppe: 55AE5A6C.000 from 93-35-198-203.ip56.fastwebnet.it/93-35-198-203.ip56.fastwebnet.it/93.35.198.203/cri.ensmp.fr/ X-Pg-Spam-Score: -3.1 (---) 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 Hello Robert, > On Fri, Jul 17, 2015 at 9:50 AM, Fabien 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