Re: usleep feature for pgbench

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: usleep feature for pgbench
Date: 2007-07-07 22:08:11
Message-ID: 46900ECB.8060304@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/7/2007 11:40 AM, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)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(at)Yahoo(dot)com #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolas Barbier 2007-07-07 23:02:33 Re: Updated tsearch documentation
Previous Message Greg Smith 2007-07-07 21:29:31 Re: Tidied up patch status page