Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHyDm-00038S-CR for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 17:54:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHyDl-0005zg-VD for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 17:54:22 +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 1ZHyDl-0005zZ-6v for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 17:54:21 +0000 Received: from 01.zmailcloud.com ([192.198.85.104] helo=mx-out-1.zmailcloud.com) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHyDg-0004iq-LW for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 17:54:19 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 34181563E95 for ; Wed, 22 Jul 2015 12:54:16 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 2F1A5A01C2 for ; Wed, 22 Jul 2015 12:54:16 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QNPEIGUVwDLO for ; Wed, 22 Jul 2015 12:54:16 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id F22F3A02DE for ; Wed, 22 Jul 2015 12:54:15 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id DC062A01C2 for ; Wed, 22 Jul 2015 12:54:15 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wYoBGSYA5eFq for ; Wed, 22 Jul 2015 12:54:15 -0500 (CDT) Received: from [172.47.23.104] (50-0-190-244.dsl.dynamic.fusionbroadband.com [50.0.190.244]) by smtp-out-1.01.com (Postfix) with ESMTPSA id 7E9D0A016A for ; Wed, 22 Jul 2015 12:54:15 -0500 (CDT) Message-ID: <55AFD8C6.8010507@agliodbs.com> Date: Wed, 22 Jul 2015 10:54:14 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: pgsql-hackers@postgresql.org Subject: Re: pgbench stats per script & other stuff References: <55AEDDA4.8020009@agliodbs.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 07/21/2015 10:25 PM, Fabien COELHO wrote: > > 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. Maybe not. If so, I would vote for: -f script1.bench:3 -f script2.bench:1 over: -f script1.bench -w 3 -f script2.bench -w 1 Making command-line options order-dependant breaks a lot of system call libraries in various languages, as well as being easy to mess up. >> 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: Oh, you misunderstand. "script1" and "script2" are meant to be user-supplied names which then get reported in things like response time output. They're labels. Better example: deposit: file: deposit.bench weight: 3 withdrawal: file: withdrawal.bench weight: 3 reporting: file: summary_report.bench weigh: 1 -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers