From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Greg Smith <gsmith(at)gregsmith(dot)com> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: New features for pgbench |
Date: | 2007-02-13 08:34:50 |
Message-ID: | 20070213083450.GB608@svr2.hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
On Tue, Feb 13, 2007 at 01:08:04AM -0500, Greg Smith wrote:
> On Tue, 13 Feb 2007, Takayuki Tsunakawa wrote:
>
> >The Win32 APIs that pgbench is using for gettimeofday() (in
> >src/port/gettimeofday.c) is much lower in resolution than Linux.
>
> I wasn't aware of this issue, and it certainly makes the whole latency
> side of pgbench pretty useless on Win32. There is code in
> src/include/executor/instrument.h that uses a higher resolution Windows
> timer API than gettimeofday() does (as you point out, that one is only
> resolves to one Windows tick, about 15ms). If I can get a Windows build
> environment setup, I'll see if I can borrow that solution for pgbench.
As long as you only need to measure time *difference*, those are pretty
easy to use. Different from Unix, but easy. If you need to keep a
counter that contains actual time it can still be done, but it's a bit
more tricky (not really hard, though).
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-02-13 16:26:45 | Re: [HACKERS] Have psql show current sequnce values - (Resubmission) |
Previous Message | Tom Lane | 2007-02-13 06:45:59 | Re: New features for pgbench |