ITAGAKI Takahiro <[EMAIL PROTECTED]> writes:
> Here is a patch to add duration option (-T) to pgbench instead of
> number of transactions (-t). -t and -T are mutually exclusive.

This seems like a fairly bad idea, because it introduces a
gettimeofday() call per transaction.  On lots of (admittedly mostly
low-end) hardware, that will impose enough overhead to seriously
affect the results.  Worse, the overhead is imposed on the client
side, which is already the bottleneck for pgbench tests.

If this were worth doing (which IMHO it isn't) the appropriate
implementation would be to set up a timer signal handler that would set
a flag to shut down the test after the appropriate amount of time.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to