Re: [HACKERS] Fixing pgbench's logging of transaction timestamps

2017-01-02 Thread Tom Lane
I wrote: > BTW, why is it that the --aggregate-interval option is unsupported on > Windows? Is that an artifact of the same disease of assuming too much > about how instr_time is represented? I don't see any very good reason > for it other than the weird decision to store the result of > INSTR_TI

Re: [HACKERS] Fixing pgbench's logging of transaction timestamps

2017-01-01 Thread Tom Lane
Fabien COELHO writes: >> 3. Forget about using the instr_time result and just have doLog() execute >> gettimeofday() to obtain the timestamp to print. This is kind of >> conceptually ugly, but realistically the added overhead is probably >> insignificant. A larger objection might be that on Wind

Re: [HACKERS] Fixing pgbench's logging of transaction timestamps

2017-01-01 Thread Fabien COELHO
Hello and happy new year, -l [...] My 0.02€: There are at least three ways we could fix it: 1. Switch over to printing the timestamp in the form of elapsed seconds since the pgbench run start, [...] About the only reason I can see for liking the current definition is that it makes it pos

[HACKERS] Fixing pgbench's logging of transaction timestamps

2016-12-31 Thread Tom Lane
pgbench's -l option is coded using inappropriate familiarity with the contents of struct instr_time. I recall complaining about that when the code went in, but to little avail. However, it needs to be fixed if we're to switch over to using clock_gettime() as discussed in the gettimeofday thread,