Re: usleep feature for pgbench - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: usleep feature for pgbench
Date
Msg-id 46900ECB.8060304@Yahoo.com
Whole thread Raw
In response to Re: usleep feature for pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 7/7/2007 11:40 AM, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> 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 #


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Tidied up patch status page
Next
From: "Nicolas Barbier"
Date:
Subject: Re: Updated tsearch documentation