Refactor calculations to use instr_time

Поиск
Список
Период
Сортировка
От Nazir Bilal Yavuz
Тема Refactor calculations to use instr_time
Дата
Msg-id 1feedb83-7aa9-cb4b-5086-598349d3f555@gmail.com
обсуждение исходный текст
Ответы Re: Refactor calculations to use instr_time  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,


In 'instr_time.h' it is stated that:

* When summing multiple measurements, it's recommended to leave the
* running sum in instr_time form (ie, use INSTR_TIME_ADD or
* INSTR_TIME_ACCUM_DIFF) and convert to a result format only at the end.


So, I refactored 'PendingWalStats' to use 'instr_time' instead of 
'PgStat_Counter' while accumulating 'wal_write_time' and 
'wal_sync_time'. Also, I refactored some calculations to use 
'INSTR_TIME_ACCUM_DIFF' instead of using 'INSTR_TIME_SUBTRACT' and 
'INSTR_TIME_ADD'. What do you think?


Regards,
Nazir Bilal Yavuz
Microsoft

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Support logical replication of DDLs
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: PATCH: Using BRIN indexes for sorted output