Re: Review: DTrace probes (merged version) ver_03

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Review: DTrace probes (merged version) ver_03
Дата
Msg-id 20080801200137.GJ4321@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Review: DTrace probes (merged version) ver_03  (Greg Smith <gsmith@gregsmith.com>)
Ответы Re: Review: DTrace probes (merged version) ver_03
Re: Review: DTrace probes (merged version) ver_03
Список pgsql-hackers
Greg Smith wrote:
> One tiny change I'd suggest here:  if you look at the code for checkpoint 
> buffer writing there are traces for two points in the process:
>
>  CheckPointBuffers(int flags)
>  {
> +       TRACE_POSTGRESQL_BUFFER_CHECKPOINT_START(flags);
>         CheckpointStats.ckpt_write_t = GetCurrentTimestamp();
>         BufferSync(flags);
>         CheckpointStats.ckpt_sync_t = GetCurrentTimestamp();
>         smgrsync();
>         CheckpointStats.ckpt_sync_end_t = GetCurrentTimestamp();
> +       TRACE_POSTGRESQL_BUFFER_CHECKPOINT_DONE();
>  }
>
> Note how the existing code also tracks how long the sync phase took  
> compared to the write one, and reports both numbers in the checkpoint  
> logs.  It would be nice to add another probe at that same point (just  
> after ckpt_sync_t is set) so that dtrace users could instrument all these 
> possibilities as well:  just buffer write time/resources, just sync ones, 
> or both.

Sounds like the thing to do would be to pass CheckpointStats into the
DONE probe.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: SSL configure patch: review
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: SSL configure patch: review