instrumentation: Keep time fields as instrtime, convert in callers

Previously the instrumentation logic always converted to seconds, only for
many of the callers to do unnecessary division to get to milliseconds. As an
upcoming refactoring will split the Instrumentation struct, utilize instrtime
always to keep things simpler. It's also a bit faster to not have to first
convert to a double in functions like InstrEndLoop(), InstrAggNode().

Author: Lukas Fittl <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Discussion: 
https://postgr.es/m/CAP53PkzZ3UotnRrrnXWAv=f4avrq9mq8zu+bxon9tpoveu6...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e5a5e0a90750d665cab417322b9f85c806430d85

Modified Files
--------------
contrib/auto_explain/auto_explain.c             |  2 +-
contrib/pg_stat_statements/pg_stat_statements.c |  2 +-
src/backend/commands/explain.c                  | 14 ++++++++------
src/backend/executor/instrument.c               | 21 +++++++++------------
src/include/executor/instrument.h               |  6 +++---
src/include/portability/instr_time.h            |  2 ++
6 files changed, 24 insertions(+), 23 deletions(-)

Reply via email to