Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aJ7UP-0000be-Ps for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Jan 2016 22:32:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aJ7UO-0002Eg-WC for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Jan 2016 22:32:33 +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 1aJ7UN-0002CB-RL for pgsql-hackers@postgresql.org; Tue, 12 Jan 2016 22:32:31 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aJ7UK-0002l9-IW for pgsql-hackers@postgresql.org; Tue, 12 Jan 2016 22:32:30 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 38553402ECF; Tue, 12 Jan 2016 14:32:22 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 3F8025EE; Tue, 12 Jan 2016 19:32:20 -0300 (CLT) Date: Tue, 12 Jan 2016 19:32:20 -0300 From: Alvaro Herrera To: Fabien COELHO Cc: Michael Paquier , "pgsql-hackers@postgresql.org" Subject: Re: pgbench stats per script & other stuff Message-ID: <20160112223220.GA882681@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.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 Fabien COELHO wrote: > > Here is a two part v12, which: > > part a (refactoring of scripts and their stats): > - fix option checks (-i alone) > - s/repleacable/replaceable/ in doc > - keep small description in doc and help for -S & -N > - fix 2 comments for pg style > - show builtin list if not found 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? I think the StatsData / SimpleStat addition should be one patch; then there's the -b changes. Then there may (or may not) be a bunch of other minor cleanups, not sure. I'm willing to commit these patches if I can easily review what they do, which I cannot with the current state. Please pgindent; make sure to add /*--- here to avoid pgindent mangling the comment: if (pg_strcasecmp(my_commands->argv[0], "setrandom") == 0) { /*-------- * parsing: > part b (weight) > - check that the weight is an int This part looks okay to me. Minor nitpick, + int i = 0, w = 0, wc = (int) getrand(thread, 0, total_weight - 1); should be three lines, not one. Also the @W part in the --help output should be in brackets, as FILE[@W], right? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers