Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHmZy-0002XS-Gp for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 05:28:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHmZy-0003AN-24 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 05:28:30 +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 1ZHmYh-0001iW-3u for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 05:27:11 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHmYd-00075B-Sj for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 05:27:09 +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 t6M5PwFO011572 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Jul 2015 07:25:59 +0200 Date: Wed, 22 Jul 2015 07:25:58 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@sto To: Josh Berkus cc: Robert Haas , PostgreSQL Developers Subject: Re: pgbench stats per script & other stuff In-Reply-To: <55AEDDA4.8020009@agliodbs.com> Message-ID: References: <55AEDDA4.8020009@agliodbs.com> 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 55AF2966.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: 55AF2966.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 Josh, >> Maybe -f file.sql:weight (yuk from my point of view, but it can be done >> easily). > > Maybe it's past time for pgbench to have a config file? That is an idea. For "simple" usage, for backward compatibility and for people like me who like them, ISTM that options are fine too:-) Also this may mean adding a dependency to some YAML library, configure issues (I'm not sure whether pg currently uses YAML, and JSON is quite verbose), maybe conditionals around the feature to compile without the dependency, more documentation... I'm not sure all that is desirable just for weighting scripts. > Given that we want to define some per-workload options, the config file > would probably need to be YAML or JSON, e.g.: > > [...] > > script1: > file: script1.bench > weight: 3 > script2: > file: script2.bench > weight: 1 > > the above would execute a pgbench with 16 clients, 4 threads, "script1" > three times as often as script2, and report stats at the script (rather > than SQL statement) level. Yep. Probably numbering within field names should be avoided, so a list of records that could look like: scripts: - file: foo1.sql weight: 9 - file: foo2.sql - internal: tpc-b weight: 2 -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers