Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aONf2-0000qE-Gp for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Jan 2016 10:49:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aONf2-0006oa-3j for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Jan 2016 10:49:16 +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 1aONf1-0006oU-I6 for pgsql-hackers@postgresql.org; Wed, 27 Jan 2016 10:49:15 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aONex-0007nS-9K for pgsql-hackers@postgresql.org; Wed, 27 Jan 2016 10:49:15 +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 [212.76.254.194]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 530C0401B0D; Wed, 27 Jan 2016 02:49:05 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4227C4BF; Wed, 27 Jan 2016 07:49:03 -0300 (CLT) Date: Wed, 27 Jan 2016 11:49:03 +0100 From: Alvaro Herrera To: Fabien COELHO Cc: "pgsql-hackers@postgresql.org" Subject: Re: pgbench stats per script & other stuff Message-ID: <20160127104903.GA597458@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: > >It seems a bit funny to have the start_time not be reset when 0.0 is > >passed, which is almost all the callers. Using a float as a boolean > >looks pretty odd; is that kosher? Maybe it'd be a good idea to have a > >separate boolean flag instead? > Obviously this would work. I did not think the special case was worth the > extra argument. This one has some oddity too, because the second argument is > ignored depending on the third. Do as you feel. Actually my question was whether keeping the original start_time was the intended design. I think some places are okay with keeping the original value, but the ones in addScript, the per-thread loop in main(), and the global one also in main() should all be getting a 0.0 instead of leaving the value uninitialized. (I did turn the arguments around so that the bool is second and the float is third. Thanks for the suggestion.) -- Á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