Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 425459FB28A for ; Sat, 7 Jul 2007 19:08:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 99065-05 for ; Sat, 7 Jul 2007 19:08:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp116.plus.mail.re1.yahoo.com (smtp116.plus.mail.re1.yahoo.com [69.147.102.79]) by postgresql.org (Postfix) with SMTP id 535FA9FB1EB for ; Sat, 7 Jul 2007 19:08:29 -0300 (ADT) Received: (qmail 50885 invoked from network); 7 Jul 2007 22:08:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=Yahoo.com; h=Received:X-YMail-OSG:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nVrFBZybX8vL8f8l3DImjF0FJDExAsmp4cPXP5zaEFZ7ZbRaE2N311LIzYgTFsiy0CLwDBOnkfObNV/Sf1BTqkks/TDWMLiSHXuAmxcByFpTlxcTjOXPXfVg6kmBMM48/dbbar/Yen619jOG99qhEUnW2W21gVX0imiKvv8SAo0= ; Received: from unknown (HELO jupiter.jannicash.info) (janwieck@68.34.254.79 with login) by smtp116.plus.mail.re1.yahoo.com with SMTP; 7 Jul 2007 22:08:26 -0000 X-YMail-OSG: ean8gPMVM1nfpyyYHDfa8f4jghSilQoqqKaQGbk_XcIFv2kadNSsCC6v4xE1G_YpHbG72I0fRA-- Received: from [172.21.8.128] (mars.jannicash.info [192.168.192.101]) (authenticated bits=0) by jupiter.jannicash.info (8.12.10/8.12.9) with ESMTP id l67M8GHY017952; Sat, 7 Jul 2007 18:08:22 -0400 (EDT) (envelope-from JanWieck@Yahoo.com) Message-ID: <46900ECB.8060304@Yahoo.com> Date: Sat, 07 Jul 2007 18:08:11 -0400 From: Jan Wieck User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Tom Lane CC: Peter Eisentraut , pgsql-hackers@postgresql.org Subject: Re: usleep feature for pgbench References: <468D42B3.4010701@Yahoo.com> <200707061644.57878.peter_e@gmx.net> <468E7AC3.3040501@Yahoo.com> <200707071036.41585.peter_e@gmx.net> <2384.1183822817@sss.pgh.pa.us> In-Reply-To: <2384.1183822817@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.068 tagged_above=0 required=5 tests=AWL=0.118, BAYES_40=-0.185, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200707/200 X-Sequence-Number: 105115 On 7/7/2007 11:40 AM, Tom Lane wrote: > Peter Eisentraut writes: >> Jan Wieck wrote: >>> You mean as a second, optional argument? Good idea. > >> I think it should only be one argument, with the units being part of the >> variable value, if any. > > No, because that makes it hard to do things like "sleep for a small > random number of microseconds". If pgbench had string concatenation > ability in its metalanguage then what you suggest would be sensible, > but let us not go there. That is exactly the reason why I made it an optional argument. The usage example in the README file shows how to actually do a random sleep between 1000 and 2500 ms. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #