Re: pgbench - doCustom cleanup
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: "Jamison, Kirk" <k.jamison@jp.fujitsu.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2018-11-20T22:43:19Z
Lists: pgsql-hackers
On 2018-Nov-20, Fabien COELHO wrote: > > > I didn't quite understand this hunk. Why does it remove the > > is_latencies conditional? (The preceding comment shown here should be > > updated obviously if this change is correct, but I'm not sure it is.) > > Pgbench runs benches a collects performance data about it. > > I simplified the code to always collect data, without trying to be clever > about cases where these data may not be useful so some collection can be > skipped. > > Here the test avoids recording the statement start time, mostly a simple > assignment and then later another test avoids recording the stats in the > same case, which are mostly a few adds. > > ISTM that this is over optimization and unlikely to be have any measurable > effects compared to the other tasks performed when executing commands, so a > simpler code is better. I don't think we're quite ready to buy this argument just yet. See https://www.postgresql.org/message-id/flat/31856.1400021891@sss.pgh.pa.us -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
pgbench: doExecuteCommand -> executeMetaCommand
- 9938d1163310 12.0 landed
-
Rework the pgbench state machine code for clarity
- 3bac77c48f16 12.0 landed
-
instr_time.h: add INSTR_TIME_SET_CURRENT_LAZY
- 6f7d02aa60b7 12.0 landed
-
pgbench: introduce a RandomState struct
- 409231919443 12.0 cited